You are not logged in.
Hi everyone,
I want to list log files whose names are changing daily. Like that;
C:\log\dd_mm_yy.txt
"dd_mm_yy.txt" is changing daily. What kind of a definition I must use in Windows command prompt to list the log file ? Could you please help me about how can I solve that problem?
Best Regards
Murat
Offline
@Echo Off
;:: Hello!
:: Setting up Date_ Var
Set "Date_=%Date:/=-%"
:: Set folder root to save logs
Set "Root=%Cd%"
:: Set an prefix for log files (optional)
Set "Prefix="
:: Example 1 - Dumping help
Help >"%Root%\%PreFix%%Date_%.txt
::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Advanced use of dump messages to log.
:: Example 2 - Dumping StdErr and StdOut from 'Type' command, two commands in one line
:: StdErr = %PreFix%%Date_%[ERR].txt
:: StdOut = %PreFix%%Date_%[Info].txt
::::::::::::::::::::::::::::::::::::::::::::::::::::
:: "1>" = StdOut = Standar Output = Text w/o errors
:: "2>" = StdErr = Standar Output Error = Text with error messages
::::::::::::::::::::::::::::::::::::::::::::::::::::
( Type "%~0"| Find "Hello" & Type ^|) 1>"%Root%\%PreFix%%Date_%[Info].txt" 2>"%Root%\%PreFix%%Date_%[ERR].txt"
Pause
Goto :Eof
.::{Honguito98}::.
Offline
Multi posted http://www.computerhope.com/forum/index … 317.0.html
Offline