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

martin

Re: Prepending timestamp before wildcard with GET will overtype original filename

No it's not possible.

You can use WinSCP .NET assembly from a PowerShell script instead:
See https://winscp.net/eng/docs/script_download_timestamped_filename#library

Or you can rename the downloaded file after the transfer using Windows [batch file] commands.
oreoloveboss

Prepending timestamp before wildcard with GET will overtype original filename

Hello, I'm using a simple get script to grab files, and I'd like to put the timestamp at the beginning of every downloaded filename.

ie:
 get /loc/*.txt c:\folder\%TIMESTAMP#yyyymmdd%-*.txt


if the file it grabbed was named thisisafilename.txt, the downloaded file will be named 20190121-lename.txt as if it is in overtype mode. Is there a way to use insert mode with renaming instead?