Re: batch file scripting

On 7/19/06, Steve Perry <sperry@xxxxxxxxxxx> wrote:

that only takes 2 lines :)))

C:\>set f=myfile_%date:~10,4%-%date:~4,2%-%date:~7,2%
C:\>echo %f%

On a semi-related note, is there any way (using "pure" cmd.exe) to identify files older than say, 5 days? For example, something similar to "find . -name "myfile\* -mtime +5".

Unfortunately I'm not allowed to add additional software, so the use
of add-on tools like cygwin/perl/etc. simply isn't an option. :(

"I'm too sexy for my code." - Awk Sed Fred.

Other related posts: