M
Mike Ford
Create a batch file with the following, substituting
whatever you want to do for the copy command (adapted from
a file by Michael Jerkovic)
@ECHO off
SETLOCAL
FOR /f "tokens=2-4 skip=1 delims=(-)" %%G IN
('echo.^|date') DO (
FOR /f "tokens=2 delims= " %%A IN ('date /t') DO (
SET v_first=%%G
SET v_second=%%H
SET v_third=%%I
SET v_all=%%A
)
)
SET %v_first%=%v_all:~0,2%
SET %v_second%=%v_all:~3,2%
SET %v_third%=%v_all:~6,4%
copy C:\whatever.txt c:\%mm%.%dd%.%yy%.txt
ENDLOCAL & SET v_year=%yy%& SET v_month=%mm%& SET
v_day=%dd%
whatever you want to do for the copy command (adapted from
a file by Michael Jerkovic)
@ECHO off
SETLOCAL
FOR /f "tokens=2-4 skip=1 delims=(-)" %%G IN
('echo.^|date') DO (
FOR /f "tokens=2 delims= " %%A IN ('date /t') DO (
SET v_first=%%G
SET v_second=%%H
SET v_third=%%I
SET v_all=%%A
)
)
SET %v_first%=%v_all:~0,2%
SET %v_second%=%v_all:~3,2%
SET %v_third%=%v_all:~6,4%
copy C:\whatever.txt c:\%mm%.%dd%.%yy%.txt
ENDLOCAL & SET v_year=%yy%& SET v_month=%mm%& SET
v_day=%dd%