1

This question already has an answer here:

I'd like to update the timestamp (Modified Date) of a file in a batch script by using the following command

"copy /b Source+,," 

but it does not work. I tried the same command through command line & it works fine. I've even tried to run the batch script as an administrator but that didn't solve it either

Any ideas ?

marked as duplicate by DavidPostill, Ƭᴇcʜιᴇ007, mdpc, Matthew Williams, Scott Jan 20 '15 at 22:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • This works here in a bat file. What is the file you are passing as parameter? Is it open in any process? – Werner Henze Dec 11 '14 at 8:16
  • Please read this answer. – DavidPostill Dec 11 '14 at 8:19
  • Hi @DavidPostill I found this command from the answer to the question you've mentioned though I faced this issue in a batch script. – Dhiwakar Ravikumar Dec 11 '14 at 8:49
  • Read all the comments to the linked answer ... – DavidPostill Dec 11 '14 at 8:53
  • 1
    have you simply tried it without the 2 commas. They are not needed, and from the linked answer (thanks, @DavidPostill ), they had to create a test within cmd.exe to test for the presence of the commas – SeanC Dec 12 '14 at 21:18