Home All Groups Group Topic Archive Search About

ASPUPLOAD + change upload folder.



Author
14 Mar 2006 1:50 PM
JimmySlam
Hi I am triyingo to upload a file with ASPUPLOAD which works fine the only
problem I need to change the folder where is going to be uploaded.

I tried with

folder = "\"+cstr(request.querystring("folder"))
path=Server.MapPath("."&folder)

Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.OverwriteFiles = true
Upload.SetMaxSize 1048576
Count = Upload.Save (path)

But always uploads into the same folder (where the ASP is uploaded).

Any tip?

Cheers!

Author
18 Mar 2006 7:43 PM
MikeR
JimmySlam wrote:
Show quote
> Hi I am triyingo to upload a file with ASPUPLOAD which works fine the only
> problem I need to change the folder where is going to be uploaded.
>
> I tried with
>
>  folder = "\"+cstr(request.querystring("folder"))
>  path=Server.MapPath("."&folder)
>
>  Set Upload = Server.CreateObject("Persits.Upload.1")
>  Upload.OverwriteFiles = true
>  Upload.SetMaxSize 1048576
>  Count = Upload.Save (path)
>
> But always uploads into the same folder (where the ASP is uploaded).
>
> Any tip?
>
> Cheers!

What does path contain? Use a response.write to show it, don't guess. If
the path really exists, does it have write permission?
MikeR

AddThis Social Bookmark Button