Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 490
How do I extract just the filename from the complete UserFilename path?

In older versions of FileUp, you should use the VBscript InstrRev function that will allow you to search backwards along a string. Using this function, you could search for a "\" to extract just the filename or a "." for the extension. Here is some sample code:

strFileName = Mid(upl.UserFilename, InstrRev(upl.UserFilename, "\") + 1)

If you have a recent version of FileUp, you can use the .ShortFileName property:

strFileName = upl.ShortFilename

Created : 12/1/2002 12:00:00 AM (last modified : 9/30/2002 4:51:46 PM)
Rate this article!