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

martin

Re: Uploading all files in a folder in order

WinSCP uploads the files in the order in which they are returned by Windows in the directory listing (so its in-deterministic).

By default the script fails when the file does not exist.
You can change this with option batch command:
https://winscp.net/eng/docs/scriptcommand_option
ademkiv

Uploading all files in a folder in order

I have a process that will generate anywhere between 5 and 17 files nightly. These files will have to be uploaded in a certain order. Since I cannot predict which files will be generated nightly I have hard time figuring out how to write a script to upload files in correct order. In what order, by default, does WinSCP upload files? Does it use timestamps and go in ascending order?

What would happen if I have a command in the script to upload a file that doesn't exist? Will the whole process fail?

Thanks for the help!