Extract Filename

Results 1 to 4 of 4

Thread: Extract Filename

  1. #1
    Al Bundy Guest

    Default Extract Filename

    1. Have a Input of type"File", how can I capture just the file name and extension from the full path?<BR>I DONT want to upload the file. Its just a simple "browse" where the user selects the file. I want to <BR>get the file name with extension and not the path.<BR><BR>For eg:<BR>If user chose:<BR>C:MyDocumentsExpensesReport.xls<BR><BR>I want to capture "Report.xls"

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Extract Filename

    Use the SPLIT function and get the data from the last element of the array

  3. #3
    Join Date
    Dec 1969

    Default This is easier...

    Instead of messing with arrays, I use the following:<BR><BR>strPath = YOUR FORM VARIABLE HERE<BR>strModPath = Right(strPath, Len(strPath) - InStrRev(strPath, "\"))<BR><BR>Good luck!<BR><BR>-John

  4. #4
    Al Bundy Guest

    Default RE: This is easier...


Posting Permissions

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