VanDyke Software



How to Put Dates in Log File Names Using the Sfxcl.exe Command-line Client

Note: This tip is for use with SecureFX for Windows.

Would you like to have your log information include the date as part of the log file name? If you are using Sfxcl.exe, the SecureFX® for Windows command-line client, 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".

You can find additional information on using Sfxcl.exe in the SFXCL Command-Line Tool for SecureFX FAQs and the SFXCL Automation Tips reference information.

VanDyke Software uses cookies to give you the best online experience. Before continuing to use this site, please confirm that you agree to our use of cookies. Please see our Cookie Usage for details.