Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    Portugal
    Posts
    53

    Huh? Determining file name

    In my project, I allow the user to browse for one or more files from his computer.

    However, the table returns the full path for the file. Example:
    Code:
    file = Dialog.FileBrowse(true, "Select File", _DesktopFolder, "All Files (*.*)|*.*|", "", "unk", true, true);
    num = Table.Count(file);
    
    for n=1,num do
    	StatusDlg.SetMeterPos(n);
    	
    	nm = String.Right(file[n], fn+1);
    	StatusDlg.SetStatusText(n.." of "..num);
    	--do my stuff...
    	StatusDlg.SetMeterPos(n);
    end
    I really need the filename only... Example:
    pic1.jpg instead of C:\pic1.jpg. Is it possible? Thanks.

  2. #2
    Join Date
    Jan 2004
    Location
    Portugal
    Posts
    53
    OK forget about it... Found a solution

  3. #3
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Look into String.SplitPath

    tFileInfo=String.SplitPath("C:\\Pictures\\MyPic.jp g")

    tFileInfo.Drive would be "C:\"
    tFileInfo.Folder would be "Pictures"
    tFileInfo.Filename would be "MyPic"
    tFileInfo.Extension would be "jpg"

Similar Threads

  1. Audio Tracks Project
    By Michael in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 03-18-2004, 10:58 PM
  2. HOWTO: Create a Project Template
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-28-2002, 01:49 PM
  3. HOWTO: "Hide" Externally Referenced Files
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-23-2002, 03:19 PM
  4. Can search allow manual browse even if file is found?
    By RichardShaw in forum Setup Factory 5.0
    Replies: 2
    Last Post: 08-28-2000, 06:08 PM
  5. Replies: 0
    Last Post: 08-17-2000, 02:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts