asp file rename

  • Thread starter Willem van Isselmuden
  • Start date
W

Willem van Isselmuden

Hello, i have this upload script,

works fine, ik kan upload multiple files to my server,
but i want them to be saved under a different namen on the server.

My form has 4 file fields and i want the filenames to be
field1.jpg, field2.jpg, field3.jpg & field4.jpg

How can I do this ?


Greetings Willem


<%

Set Upload = Server.CreateObject("Persits.Upload")

'Count = Upload.Save("/cgi-bin")

Count = Upload.SaveVirtual("/cgi-bin/foto")
Response.Write Count & " Bestand(en) Ge-upload naar Photography2day.com"

%>
 
W

Willem van Isselmuden

oke thanx, but then I have another question,

all the path are c:\blabla, but why on c ? thats my local drive?
i want it to go to my cgi-bin/foto

greetings Willem
 
S

Steven Burn

Upload.Save(Server.MapPath("cgi-bin/path"))

Without Server.MapPath, it treats it as a local path, not a virtual one.

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 

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

Members online

No members online now.

Forum statistics

Threads
474,144
Messages
2,570,823
Members
47,369
Latest member
FTMZ

Latest Threads

Top