Posted By

brm on 06/16/15


Tagged

copy sysadmin


Versions (?)

Copy file with current date Windows


 / Published in: DOS Batch
 

Copy file as current date as name file to destination directory

  1. @echo off
  2.  
  3. echo f | xcopy /f /Y "\\src-dir\filename.ext" "\dest-dir\filename_%date:~-4,4%%date:~-10,2%%date:~-7,2%.ext"
  4.  
  5. cls

Report this snippet  

You need to login to post a comment.