I want to create log files for a process I am automating in WinXP. Included the log file name,1 I want to have the date when the scheduled task ran. I have tried using the %DATE% environment variable without any success. The line which does not work is below.
defrag C:\ /v >"C:\Program Files\Disk Defragmenter\Logs\Defrag_log_%DATE%.txt"
Does any one know why the current date will not print out? Do I need a delimiter around %DATE% or something? Thanks.
defrag C:\ /v >"C:\Program Files\Disk Defragmenter\Logs\Defrag_log_%DATE%.txt"
Does any one know why the current date will not print out? Do I need a delimiter around %DATE% or something? Thanks.