Click to See Complete Forum and Search --> : aspupload Help! -- save files to directory


mparker1113
10-12-2006, 09:07 AM
Hi,

I am pretty new to ASP.

I am working on a server running asp, and I assume that it has aspupload, because this code works (which is from an aspupload tutorial):

<%
Set Upload = Server.CreateObject("Persits.Upload.1")
Count = Upload.Save("c:\upload")
%>

<% = Count %> files uploaded.



So, I am hoping that i have aspupload.

It appears that the files I upload are being saved to the server at "c:\upload" but since I want to put them in a server directory, having there does me no good. -- I could deal with them being there I guess, if I could access them, but I have had no luck with that.

Could someone help me figure out how to save the files to a directory ?

I would be so glad ( and my boss too ) !

-- Mike

jvanamali
10-12-2006, 03:33 PM
Instead of

Count = Upload.Save("c:\upload")

try using

Count = Upload.Save(server.Mappath("/uploadfolder/"))

where uploadfolder is a folder in your server

' the current directory
currDir = Server.MapPath(".")

' the parent directory
parentDir = Server.MapPath("..")

' the application's root directory
rootDir = Server.MapPath("/")