Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

george22

That did the trick! Just didn't understand the necessity for -filemask. Thank you so much! Really love the app and been meaning to donate. Will get that done today!
martin

Re: Upload with Time Constraint not working

The source parameter of the put command supports simple Windows wildcards only:
https://winscp.net/eng/docs/scriptcommand_put#remarks

For advanced options, you need to use -filemask switch. So like this:
put c:\bm\sales\2025\*.txt -filemask=>today /uploads/

This also works:
put c:\bm\sales\2025\* -filemask=*.txt>today /uploads/
george22

Upload with Time Constraint not working

I have a bunch of files in a folder but only need to ftp the most recent file.
The command I'm using is below which uploads all files and works great.
put c:\bm\sales\2025\*.txt /uploads/

However, when I try adding any time constraints in variations of > < = but get "No file matching '*.txt<1DS' found." every time. I've even tried the
put c:\bm\sales\2025\*.txt>today /uploads/

with variations of < and = but get the same result. I was using a 2022 version but upgraded to the latest version and get the same result. Log snippet below.
< 2025-03-14 21:35:19.666 Script: Active session: [1] blueskytech@sftp***.***.com
> 2025-03-14 21:35:19.666 Script: put c:\bm\sales\2025\*.txt<1DS /uploads/
< 2025-03-14 21:35:19.666 Script: No file matching '*.txt<1DS' found.
. 2025-03-14 21:35:19.666 Copying 0 files/directories to remote directory "/uploads/" - total size: 0

Any help would be greatly appreciated. Thanks in advance.