Topic "Creating batch file for sftp - do not want to send empty files"

Author Message
ConnieD

Guest


I am creating a batch file to sftp files to another server. Sometimes the application that creates the files will create empty files. I do not want to send these, but have not found a way to exclude them.
Any guidance would be great.
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
Use a file mask with a size constraint
https://winscp.net/eng/docs/file_mask#size_time

Code:
put -filemask=*>0 C:\local\path\* /remote/path
ConnieD

Guest


Thank you for the code sample. That worked great.
Advertisements

You can post new topics in this forum

Search

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License