|With help from another post on this site, I have created a batch file that copies a file from one system to another. The file is renamed and the date that it is copied is added to the new name. Here is an example of one of my batch files:|
for /f "tokens=1-3 delims=/- " %%a in ('date /t') do set XDate=%%a-%%b-%%c
for /f "tokens=1-3 delims=/- " %%a in ('date /t') do set XYear=%%c
echo Date=%XDate% Year=%XYear%
copy "\\192.168.0.6\Files\assets\Science\scienceinaction.mp3" "\\server\dropbox\BBC_Science In Action %XDate%_%XYear%_51613.mp3"
What I would really like to be able to do is to get the XDate variable from the date of the original/first file, rather than the system date when it is copied. Is there any way to do this? I am using WinXP.