Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    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


  •  

    Posting Permissions

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