Skip to content

Instantly share code, notes, and snippets.

@deizel
Last active August 24, 2019 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deizel/2787999 to your computer and use it in GitHub Desktop.
Save deizel/2787999 to your computer and use it in GitHub Desktop.
Robocopy - desktop archiver
@echo off
set robocopy=C:\Program Files\Windows Resource Kits\Tools\robocopy.exe
set source=C:\Documents and Settings\%username%\Desktop
set destination=%source%\backup\%date:~6,4%-%date:~3,2%
set exclude_dirs=backup downloads dropbox projects
set exclude_files=*.lnk *.bat
md "%backup%"
"%robocopy%" "%source%" "%destination%" /mov /e /xd %exclude_dirs% /xf %exclude_files% /xx
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment