SUPPORT > TIPS
Send us a question or comment

   

How to Put Dates in Log File Names

Would you like to have your log information include the date as part of the log file name? If you are using the SecureFX® or AbsoluteFTP® command-line client (Sfxcl.exe or Aftpcl.exe, respectively), you can create a DOS batch file to make the log information go to a file with the date as part of the name.

Here's a sample DOS batch file:

FOR /f "tokens=2-4 delims=/ " %a in ('DATE /T') do SET MyDate=%a%b%c

sfxcl.exe /log c:\MyLogs\SecureFX\%MyDate%.log ... [rest of command]

This will create a log file with the current date as the log name, such as "05212003.log".

Was this information helpful?
Yes No
Thank you!
Send your comments and questions to VanDyke Software Support,
or join the discussion in the VanDyke Software Forums.
Can't find the answer you're looking for?
Ask VanDyke Software Support directly
and we will get back to you as soon as possible.
1.  Read or download one of our secure solutions white papers. 2.  Download a free
30-day evaluation copy of our products.
3.  Let us help define the right Secure Shell solution for your company. 4.  Subscribe to our What's New page for tips, solution ideas, and product news.