Copy newest file


/ Published in: DOS Batch
Save to your folder(s)

batch script to copy newest file from directory to another directory


Copy this code and paste it in your HTML
  1. @echo off
  2.  
  3. FOR /F %%I IN ('DIR "\\src-dir\file*.ext" /B /O:-D') DO XCOPY "\\src-dir\%%I" "\\dst-dir\filename.ext" /D /V /Y
  4.  
  5. cls

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.