Forums

This topic is locked

Move files from one DIR. to another DIR. via ASP

Posted 28 Jan 2002 05:13:24
1
has voted
28 Jan 2002 05:13:24 Mitchel Tendler posted:
Hi!

I downloaded some ASP code that enables users to UPLOAD a file to a directory via a browser.

What I was wondering if anyone know of a way via a browser to move a file from one directory to another directory via a browser, not an FTP program.

Thanks!

Mitch

Replies

Replied 28 Jan 2002 09:31:12
28 Jan 2002 09:31:12 Viktor Farcic replied:
This will do the work!

<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject"

objFSO.MoveFile Server.MapPath("/someDir/Foo.asp", _
Server.MapPath("/someDir/Bar.asp"

Set objFSO = Nothing
%>

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi!

I downloaded some ASP code that enables users to UPLOAD a file to a directory via a browser.

What I was wondering if anyone know of a way via a browser to move a file from one directory to another directory via a browser, not an FTP program.

<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager
Replied 28 Jan 2002 15:13:06
28 Jan 2002 15:13:06 Mitchel Tendler replied:
Hi Viktor!

Thanks for the help, but I should have mentioned that I am a semi-novice at ASP, so could you please give me some tips as to what to do with the code?

Thanks!

Mitch
Replied 28 Jan 2002 17:23:31
28 Jan 2002 17:23:31 Viktor Farcic replied:
Give me more data:
1. folder where image is.
2. folder where image should be moved.
3. name of image

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi Viktor!

Thanks for the help, but I should have mentioned that I am a semi-novice at ASP, so could you please give me some tips as to what to do with the code?

Thanks!

Mitch
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager
Replied 28 Jan 2002 19:07:15
28 Jan 2002 19:07:15 Mitchel Tendler replied:
Viktor,

Sorry for not being clear. <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

The upload page allows the user to BROWSE there local hard drive, select a file and upload it to a pre-defined directory.

What I wanted to do with the MOVE PAGE, was to allow certain users to select/browse a file on the remote directory (the directory were the UPLOAD page sends the files) and move them to another pre-defined directory.

Basically from a REVIEW directory, to an APPROVED directory.

So everything can be pre-defined, except for the name of the file.

Thanks!

Mitch
Replied 30 Jan 2002 22:28:30
30 Jan 2002 22:28:30 Mitchel Tendler replied:
vfarcic


help?
Replied 31 Jan 2002 09:49:27
31 Jan 2002 09:49:27 Viktor Farcic replied:
Search for it on www.planet-source-code.com (keywords: 'file manager', 'site manager', 'site explorer'...). Be prepared for a lot of hand coding. Don't expect to find solution if you're unexperienced with coding.

Viktor Farcic

TalkZone Manager


Edited by - vfarcic on 31 Jan 2002 09:54:48
Replied 22 Jan 2003 17:02:48
22 Jan 2003 17:02:48 Martyn Haigh replied:
Am i right in thinking that the syntax for

<pre id=code><font face=courier size=2 id=code>
objFSO.MoveFile Server.MapPath("/someDir/Foo.asp", Server.MapPath("/someDir/Bar.asp"
</font id=code></pre id=code>

is

<pre id=code><font face=courier size=2 id=code>
objFSO.MoveFile From, To
</font id=code></pre id=code>

Thanks

Reply to this topic