Post a reply

Options
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)

Options

Topic review

lalillie

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.
martin

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
lalillie

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?