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

bindassbasanta

Unique file naming

Yes, The way to get a unique file name is by using /log=logpath/logFileName!Y!M!D!T.log

here the !Y is year and so on.

you can append this format in other places too ;)
SDiddy

Unique Logfile Name

Trying to attach a timestamp at the end of the logfile name so it will be easy for me to trouble shoot when I have an issue

here is the batch file that I am running...

winSCP.exe /console /script=MyScript.txt /log="c:\log\MyScript_%TIMESTAMP#yyyymmdd%.log"

all I get in the /log directory is MyScript_.log

thanks for the help