Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

bryant-v

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.
martin

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.
bryant-v

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?