Forums
This topic is locked
Moving Files via ASP
Posted 17 May 2004 22:43:22
1
has voted
17 May 2004 22:43:22 Jack Cider posted:
My site is on a host that provides the ASPSimpleUpload component for me to upload files. I got the uploading part of it down (I think). But I want to turn this into a feature for end users of my site. So, I'd like to be able to move files that users upload from the upload folder (which has write access) to another folder where anything that is uploaded is protected from being deleted or altered. Is there a "Move File" command I could use? thanks in advance for any help.Jack
Replies
Replied 18 May 2004 01:21:08
18 May 2004 01:21:08 Phil Shevlin replied:
You would use the File System Object (FSO) to copy the file. See:
www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=207
Then you would delete it with FSO. See:
www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=207
However, this would not really be "protected." The same permissions needed to upload the original are needed to move it. You may need to rethink the problem because it seems redundant. I would just upload to where it needs to be. People can't just "simply" delete/alter files on your server.
www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=207
Then you would delete it with FSO. See:
www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=207
However, this would not really be "protected." The same permissions needed to upload the original are needed to move it. You may need to rethink the problem because it seems redundant. I would just upload to where it needs to be. People can't just "simply" delete/alter files on your server.