Here is a batch script I use to make a backup of my laptop. I have it backing up multiple folders, but here is example of backing up a laptop folder (My Thunderbird Profile) to a networked computer share. Will work both ways.
for /f “tokens=2-4 delims=/ ” %%g in (‘date /t’) do (
set mm=%%g
set dd=%%h
set yy=%%i
)if exist “\\IPADDESS\c$\Users\Administrator\Documents\My Laptop Backups\%mm%-%dd%-%yy%” (
rd /S /Q “\\IPADDRESS\c$\Users\Administrator\Documents\My Laptop Backups\%mm%-%dd%-%yy%”
)xcopy “C:\Users\Administrator\AppData\Roaming\Thunderbird\Profiles”
“\\IPADDRESS\c$\Users\Administrator\Documents\My Laptop Backups\%mm%-%dd%-%yy%” /s /i
Tags: .bat, Batch Script, xcopy


