Rename file upload - Pure ASP upload

T

Thomas A. Rowe

Suggest you take a look at http://www.aspupload.com which has that functionality built-in, however
it is a two step process, first the file is uploaded, then it is copied to a new name, so you will
need a junk folder, which you will have to empty frequently if you have a lot of uploads.

If you continue to use the PureASP Upload script you may find it easier to just have the users
rename the file as required prior to uploading them.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================
 
B

Beefminator

Hey Tom,

After uploading the file, I was able to figure how to rename the upload
file to include an unique confirmation number. I added the following
codes after ASP file upload code (uploadexmple.asp):

<%

Dim fso

Set fso = CreateObject("Scripting.FileSystemObject")

'Move a File

fso.GetFile("c:\" & Uploader.Files("file1").FileName)).Move("c:\" &
Uploader.Form("ConfirmID") &"_"& Uploader.Files("file1").FileName))

%>

I found the FileSystemObject codes here:
http://www.codeproject.com/asp/ASP_and_FileSystemObject.asp

I used the confirmation code here:
http://www.experts-exchange.com/Applications/MS_Office/FrontPage/Q_21641234.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top