Unique Logfile Name

Advertisement

SDiddy
Joined:
Posts:
1
Location:
New Jersey

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

Reply with quote

Advertisement

bindassbasanta
Joined:
Posts:
1
Location:
Nepal

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

Reply with quote

Advertisement

You can post new topics in this forum