Help with source file mask

Advertisement

lalillie
Joined:
Posts:
2
Location:
NY

Help with source file mask

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,392
Location:
Prague, Czechia

Re: Help with source file mask

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

Reply with quote

lalillie
Joined:
Posts:
2
Location:
NY

Re: Help with source file mask

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.

Reply with quote

Advertisement

You can post new topics in this forum