Move file with VBS

Core FTP client questions and answers
Post Reply
shyler
Posts: 3
Joined: Wed May 05, 2010 7:31 pm

Move file with VBS

Post by shyler »

I am using the below code to download a file when I click a button. I need to be able to move the file from one folder to another in the ftp directory after the file has been downloaded.

I've tried variations of

move /y "%2%1" %2..\sub2\

and

RNFR /original_sourcepath/%1
RNTO /processed/%1

but no luck yet.

Any suggestions?

CURRENT CODE:

csite = " -s -O -site yourSiteName -d "
opath = ftpDirectory\fileName
pathf = localFolder\
runpath = csite & opath & " -p " & pathf & " {ENTER}"

Set wShell = CreateObject("WScript.Shell")
wShell.Run "coreftp.exe" & runpath, 7, true
Set wShell = nothing
shyler
Posts: 3
Joined: Wed May 05, 2010 7:31 pm

Post by shyler »

I've decided to just -delsrc on download, and then upload them to the new directory.
Post Reply