Topic "Need help creating a script"

Author Message
[View user's profile]

Joined: 2015-07-24
Posts: 1
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.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
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:

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License