Topic "Moving Files in Remote Directory Failing."

Author Message
coling123
[View user's profile]

Joined: 2017-08-01
Posts: 1
Hi all,

sorry to be dense but can't make this work. Using script and FTPS to login to remote server. Land in TagLabel directory. Copy *.pdf to local directory and then move remote files to a sub directory called archive and disconnect. I can get the files but get an error when trying to move the remote files that "The system cannot find the path specified."

Script looks like this:-

# Connect
open ftpes://username:password@ftp.site.com/
# Change remote directory
cd /TagLabel
#Change local directory
lcd C:/TestFTPVTTagLabel
# Download file to the local directory
get *
mv * archive/
# Disconnect
close
# Exit WinSCP
exit


< 2017-08-01 15:30:29.398 226 Transfer complete.
. 2017-08-01 15:30:29.402 Download successful
. 2017-08-01 15:30:29.402 Transfer done: '/TagLabel/Godady139.pdf' [103940]
> 2017-08-01 15:30:29.402 Script: mv *.pdf archive/
. 2017-08-01 15:30:29.402 Retrieving directory listing...
> 2017-08-01 15:30:29.402 TYPE A
< 2017-08-01 15:30:29.423 200 Type set to A.
> 2017-08-01 15:30:29.423 PASV
< 2017-08-01 15:30:29.444 227 Entering Passive Mode (40,71,229,79,78,44).
> 2017-08-01 15:30:29.444 LIST -a
. 2017-08-01 15:30:29.445 Connecting to 40.71.229.79:20012 ...
< 2017-08-01 15:30:29.464 150 Opening ASCII mode data connection.
. 2017-08-01 15:30:29.471 Session ID reused
. 2017-08-01 15:30:29.472 Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD
. 2017-08-01 15:30:29.472 TLS connection established
. 2017-08-01 15:30:29.485 Data connection closed
. 2017-08-01 15:30:29.485 03-02-17 03:57PM 103940 Godady139.pdf
< 2017-08-01 15:30:29.487 226 Transfer complete.
. 2017-08-01 15:30:29.487 Directory listing successful
. 2017-08-01 15:30:29.487 ..;D;0;1899-12-30T05:00:00.000Z;0;"" [0];"" [0];---------;0
. 2017-08-01 15:30:29.487 Godady139.pdf;-;103940;2017-03-02T19:57:00.000Z;1;"" [0];"" [0];---------;0
. 2017-08-01 15:30:29.487 Moving file "Godady139.pdf" to "archive/Godady139.pdf".
> 2017-08-01 15:30:29.487 RNFR /TagLabel/Godady139.pdf
< 2017-08-01 15:30:29.505 350 Requested file action pending further information.
> 2017-08-01 15:30:29.505 RNTO /TagLabel/archive/Godady139.pdf
< 2017-08-01 15:30:29.526 550 The system cannot find the path specified.
. 2017-08-01 15:30:29.526 Asking user:
. 2017-08-01 15:30:29.526 Error moving file 'Godady139.pdf' to 'archive/Godady139.pdf'. ("The system cannot find the path specified. ")
< 2017-08-01 15:30:29.526 Script: Error moving file 'Godady139.pdf' to 'archive/Godady139.pdf'.
< 2017-08-01 15:30:29.526 Script: The system cannot find the path specified.
. 2017-08-01 15:30:29.526 Script: Failed
. 2017-08-01 15:30:29.526 Script: Exit code: 1
. 2017-08-01 15:30:29.538 Disconnected from server
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26911
Location: Prague, Czechia
And does the subfolder exists?

What does ls archive say?
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License