Windows Scripting Forums

Full Version: Batch script to copy files !!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Frens,

I have written a small batch script to move the files from two directories to one main directory. It should record all the activities in a log file like files have been moved successfully from directory b to directory A and total number of files moved along with timestamp but its not working. Can you please review and help? Appreciate your help. Also tell me if we can automate this to run everyday at particular time (between 10pm - 11pm)

echo "files moving at "%date%-%time%" >> c:\OutputFile.log
move "C:\A\*.*" "C:\Test" >> C:\OutputFile.log
move "C:\B\*.*" "C:\Test" >> C:\OutputFile.log
echo "files moved at "%date%-%time%" >> c:\outputfile.log
Reference URL's