Renaming Help again.

Results 1 to 2 of 2

Thread: Renaming Help again.

  1. #1
    Join Date
    Dec 1969

    Default Renaming Help again.

    I have a file upload page that i&#039;m trying to rename the file once it gets to the server. Below is the code i&#039;m using to upload the file. Could some please tell me how i would go about renaming the file. Or where I could find a real good example. I&#039;m new to asp. Thanks<BR><BR>&#039;Create and Write to a File<BR> AF_curPath = Request.ServerVariables("PATH_INFO")<BR> AF_curPath = Trim(Mid(AF_curPath,1,InStrRev(AF_curPath,"/")) & "")<BR> if Mid(AF_curPath,Len(AF_curPath),1) &#060;&#062; "/" then<BR> AF_curPath = AF_curPath & "/"<BR> end if <BR> on error resume next<BR> AF_strm2.SaveToFile Trim(Server.mappath(AF_curPath))& "\" & UploadRequest.Item(AF_curKey).Item("FileName"),2<B R>

  2. #2
    Join Date
    Dec 1969

    Default RE: Renaming Help again.

    Check out the documentation for your upload component. I imagine all you would have to do is change the last line:<BR><BR>AF_strm2.SaveToFile Trim(Server.mappath(AF_curPath))& "\" & newFileName, 2

Posting Permissions

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