@echo off :Flags for %%f in (%*) do ( if /i "%%f" == "/DEBUG" (@echo on) ) :FindBin set bin= & pushd "%~dp0" :FindBinInner if exist ".bin" goto FindBinDone if "%~d0\" == "%cd%" goto ErrorNoBin cd .. & goto FindBinInner :FindBinDone set "bin=%cd%\.bin" & popd :CreateInfoDir rem Create %client_dir%\Info\YYYY-MM-DD and set path as %log_dir% call "%bin%\Scripts\init_client_dir.cmd" /Info /Transfer :Launch call "%bin%\Scripts\Launch.cmd" Program "%bin%\FastCopy" "FastCopy.exe" "/logfile=%log_dir%\FastCopy.log /cmd=noexist_only /utf8 /skip_empty_dir /linkdest /exclude=$RECYCLE.BIN;$Recycle.Bin;.AppleDB;.AppleDesktop;.AppleDouble;.com.apple.timemachine.supported;.dbfseventsd;.DocumentRevisions-V100*;.DS_Store;.fseventsd;.PKInstallSandboxManager;.Spotlight*;.SymAV*;.symSchedScanLockxz;.TemporaryItems;.Trash*;.vol;.VolumeIcon.icns;desktop.ini;Desktop?DB;Desktop?DF;hiberfil.sys;lost+found;Network?Trash?Folder;pagefile.sys;Recycled;RECYCLER;System?Volume?Information;Temporary?Items;Thumbs.db /to=%client_dir%\Transfer\" goto Exit :ErrorNoBin popd color 4e echo ".bin" folder not found, aborting script. echo. echo Press any key to exit... pause>nul color goto Exit :Exit