batch for forlders synchronization
synfolders.bat
@echo on
rem Save the current dir, [d] is disk letter, [p] is path name
pushd %~dp0
rem Change into my work dir
e:
cd \My Documents\My Company\ÈÕ¿¯\Code\pub
rem Coping my files to the public server
xcopy * l:\pub /s/e/y
rem Create the new dir with current system date in the pravite dir
rem [%DATE:~-10%] is get the last 10 ascii from the system date
md l:\zhangy\pub\%DATE:~-10%
rem Coping my file to the new dir in the pravite dir
xcopy * l:\zhangy\pub\%DATE:~-10% /s/e/y
xcopy * l:\zhangy\pub\whole /s/e/y
rem Resume the old dir
popd
@echo off


