set curDate=0207 rem backup base folder without quotes but with trail slash\ set bbf=C:\a_backup_folder\%curDate%\ rem Instructions: rem Windows Control Panel, Regional Settings, rem Change date and time so that time is displayed as hh_mm rem Use this when you have files in more than one location rem pick a backup folder , within it every day you create a new folder with curDate eg 0207 on Feb 7 rem and you modify curDate each time. rem The backup basically takes a snapshot of that time, rem and copies to a new folder within your curDate folder. rem edit the rest, copying any part you need rem Comments are mostly for educational purposes. rem TIP: when setting this up, write PAUSE at the bottom of this script to allow you to see errors. rem once you are sure it works then remove PAUSE. rem no need to edit, this is the intermediate location set mid=%bbf%0000 rem edit this for copying individual files xcopy "C:\somefolder\somefile1.jsp" "%mid%\" /v /i /y xcopy "C:\couldbeanotherfolder\anotherfile.jsp" "%mid%\" /v /i /y rem edit this for copying directories rem copying directory do 3 things: /s to copy subdir, no trail slash, and must type directory name too if wish not to just dump contents xcopy "C:\someotherfolder\include" "%mid%\include" /v /i /y /s rem --- no need to edit below this line ----- rem When copy folders no need extra \ it does nothing xcopy "%mid%" "%bbf%%TIME%" /V /I /S