Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-05-2005, 03:09 PM   PM User | #1
jaywhy13
Regular Coder

 
Join Date: Dec 2004
Location: Jamaica
Posts: 592
Thanks: 2
Thanked 0 Times in 0 Posts
jaywhy13 is an unknown quantity at this point
Arrow How i do i get the file name now?

Set Upload=Server.CreateObject("Persits.Upload.1")
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.
jaywhy13 is offline   Reply With Quote
Old 01-05-2005, 03:30 PM   PM User | #2
ghell
Senior Coder

 
Join Date: Apr 2003
Location: England
Posts: 1,192
Thanks: 5
Thanked 13 Times in 13 Posts
ghell is on a distinguished road
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
Code:
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
__________________
My tech/code blog
ghell is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:47 AM.


Advertisement
Log in to turn off these ads.