Post a reply

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)


Topic review


Re: Need help creating a script

You can upload all files modified/created in a time range using:

put -filemask="*>=1D" c:\toupload\*

The above example uploads all files created in the last day (24 hours).


You can also use an absolute time like:

put -filemask="*>=2015-07-27 15:00:00" c:\toupload\*

For a general introduction to WinSCP scripting, see:

To schedule your script, see:

Need help creating a script

We have an environment where each location scans into a directory structure on a local pc. They already have WINSCP and a profile that logs them into a Windows IIS-based SFTP server in user isolation mode. The user manually moves new files from the PC to the server. Unfortunately the users keep doing this incorrectly which is creating a lot of manual rework. Note that the files on the SFTP server are automatically processed and moved to another location (not on that server).

We would like to set up a script that runs periodically and copies (not move) files that are new since the last time the script ran from the pc to the server maintaining the directory structure...

Note that this runs in a HIPAA compliant environment and is an urgent need for my client. Please contact me if you can help.