Uploading and Renaming File

Results 1 to 3 of 3

Thread: Uploading and Renaming File

  1. #1
    Join Date
    Dec 1969

    Default Uploading and Renaming File

    Is it possible that I can rename an uploaded file? or can I rename an existing file in my server using asp??<BR><BR>Any help will be very much appreciated...

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs.com, # 36

    For a FAQ on how to rename files using FSO, check out this FAQ:<BR>http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=36<BR><BR>For a whole slew of FAQs on the FileSystemObject, check out:<BR>http://www.aspfaqs.com/aspfaqs/ShowCategory.asp?CatID=4<BR><BR>Happy Programming!

  3. #3
    Join Date
    Dec 1969

    Default RE: Uploading and Renaming File

    I never really found a rename function but I did this as a work around<BR><BR>Dim FSO<BR>Dim fOld<BR>Dim fNew<BR><BR>fOld="C:SomeFolderOldFileName.txt<BR>f New="C:SomeFolderNewFileName.txt<BR><BR>Set FSO = Server.CreateObject("Scripting.FileSystemObject")< BR>FSO.CopyFile fOld, fNew<BR>Set DelFile = FSO.GetFile(fOld) &#039Now I delete the old file<BR>DelFile.delete<BR>Set FSO=Nothing

Posting Permissions

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