get -delete is only moving and deleting one file

Advertisement

bryant-v
Guest

get -delete is only moving and deleting one file

I'm trying to move all .xml files from my team's FTP server to our file server everyday and have just started encountering an issue. So everyone knows, this command worked up until 8 days ago for us.

winscp.com /command ^
        "option batch on" ^
        "option confirm off" ^
        "open ftp:<userinfo>" ^
        "cd Initial" ^
        "option transfer binary" ^
        "get -delete *.xml <filepath>" ^
        "close" ^
        "exit"

When I run this batch file it will only grab the first file, move it, delete it, then it stops running. If I remove the
-delete
option then it will move everything over from the FTP server. Can anyone see why it behaves differently with and without the
-delete
option?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
30,411
Location:
Prague, Czechia

Re: get -delete is only moving and deleting one file

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

bryant-v
Guest

Martin,

We figured out that there were partial files that weren't allowing permission to delete and that is what caused the script to crash. Everything is now running great after removing those files.

Thank you for your time.

Reply with quote

Advertisement

You can post new topics in this forum