Topic "Help with source file mask"

Author Message
lalillie
[View user's profile]

Joined: 2016-09-28
Posts: 2
Location: NY
I've run into a problem uploading only new files. This is NOT a sync. We have files that remain in the source directories. Any new files need to be uploaded to the FTP server. Those files are processed and moved. No files remain in the FTP folder.

The command in my script:
put \\source\*.tif>1H /destination/

Result in the log:
> 2016-09-28 16:00:04.645 Script: put \\source\*.tif>1H /destination/
< 2016-09-28 16:00:04.645 Script: No file matching '*.tif>1H' found.

Files created at 15:48 exist in the directory. Don't the masks work the same way on the source files as they do on the destination files?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
lalillie wrote:
Don't the masks work the same way on the source files as they do on the destination files?

You probably mean local vs. remote files, not source vs. destination files.
Yes for local files, only standard Windows wildcards are supported.
See https://winscp.net/eng/docs/scriptcommand_put#fn1

But you can use the -filemask switch instead:

put \\source\*.tif -filemask=>1H /destination/

https://winscp.net/eng/docs/scriptcommand_put#filemask
lalillie
[View user's profile]

Joined: 2016-09-28
Posts: 2
Location: NY
martin wrote:
put \\source\*.tif -filemask=>1H /destination/


Thank you for the clarification of local/remote. This is my first time using WinSCP and FTP clients in general. The -filename switch is just what I needed.
Advertisements

You can post new topics in this forum






Search Site

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