I would like to append the ddmmyy to the file name, copy the file and move to a specific location. So far this is what I have, and I am not able to get the Date Modified to work correctly.
original code:
@Echo Off
@For /F "tokens=1,2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Day=%%A
Set Month=%%B
Set Year=%%C
Set Year=%%D
Set All=%%A%%B%%C%%D
)
@For %%a in ("*.txt") do copy %%a "import\%%~na_%All%.csv"
I tried the following:
@For %%a in ("*.txt") do copy %%a,,+ "import\%%~na_%All%.csv"
@For %%a in ("*.txt") do copy %%a "import\%%~na_%All%.csv,,+"
@For %%a in ("*.txt") do copy %%a "import\%%~na_%All%.csv",,+
The file name copies and appends the date correctly but, I can't get it to update the Date Modified correctly.