Backup folder over network (batch)

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.

[vb]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[/vb]

You may also like:

Run only scripts that you trust. (Powershell) If you are like me you have probably run into the following error when trying to run powershell scripts. This becomes very annoying and tedious if you...
READ ALSO  5 Ways to Share Personal Data on Linux-Windows Dual Boot PCs