Hello,

I am using the following ASP file upload code:
http://www.asp101.com/articles/jacob/scriptupload.asp

I would like to rename the file being upload to a disk, that is add a
username to the filename.

Any ideas?

Thanks,
Jason

Re: Rename file upload - Pure ASP upload by Thomas

Thomas
Thu Aug 31 09:48:21 CDT 2006

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
==============================================


"Beefminator" <jkesselring@cfl.rr.com> wrote in message
news:1157034965.314785.65660@m73g2000cwd.googlegroups.com...
> Hello,
>
> I am using the following ASP file upload code:
> http://www.asp101.com/articles/jacob/scriptupload.asp
>
> I would like to rename the file being upload to a disk, that is add a
> username to the filename.
>
> Any ideas?
>
> Thanks,
> Jason
>



Re: Rename file upload - Pure ASP upload by Beefminator

Beefminator
Thu Aug 31 13:01:50 CDT 2006

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