View Full Version : How i do i get the file name now?
01-05-2005, 04:09 PM
Count = Upload.SaveVirtual ("/uploads")
I just used that to upload the file, how now do i get the file name... not the file.path, just the name of the file.
01-05-2005, 04:30 PM
ive never used this COM component (i eventually found a pure asp one) so im not entirely sure, if you can get the full path you can get the filename out of it like this
strFilePath = "..."
arrFilePath = Split(strFilePath, "\")
strFileName = arrFilePath(UBound(arrFilePath))
this gets the file path, splits it at any \s (use /s if it isnt a physical path) and displays everything after the last \
you may be able to do a for each loop on the object to see all of the properties of that object and it will just tell you which to use, i would suggest looking where you got it from for a list of collections, methods, properties etc
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.