1.

Solve : help! extracting date modified/created parameter?

Answer»

Hey guys, I'm NEW to the community but I've been lurking for a quite some time now.

Anyway, I WOULD just like to know if there's any way to extract the date modified/created from a file in ORDER to use it to name ANOTHER file.

For EXAMPLE, file1.dat was created on 03/24/2006. I want to rename file2.dat to file2_03242006.dat. Any suggestions?passing the filename as %1 :

::: assuming US format date
set fred=%~t1
ren %1 %1_%fred:~0,2%%fred:~3,2%%fred:~6,4%



This should do you
Graham



Discussion

No Comment Found