Hi All,
I am performing copy operation in batch script (Windows 7 32 bit operating system) but date modified is not updated. For e.g. - If file creation date is 26th April 2010 then after copy command still the date modified is showing as 26th April 2010 whereas it should be today's date because that is when copy function was executed. I googled it and i found that there is another parameter - "Date Created" which shows correct date. But i want "Date modified" to be updated to reflect time when copy was done.
Can anyone please help?
Date modified not updated after copying?
Moderator: DosItHelp
-
- Posts: 257
- Joined: 04 Mar 2014 11:14
- Location: germany
Re: Date modified not updated after copying?
hallo,
you can use an empty file before copy
Phil
you can use an empty file before copy
Code: Select all
for %i in (source) do type nul>target\%i && copy /y %i target
Phil
Re: Date modified not updated after copying?
Well thanks! I got better solution:
copy filename.txt /B+ ,,/Y
copy filename.txt /B+ ,,/Y
Re: Date modified not updated after copying?
sam14189 wrote:Well thanks! I got better solution:
copy filename.txt /B+ ,,/Y
Yep. That code has been posted before and linked to Microsoft's KB article.
http://support.microsoft.com/kb/69581