Last active
October 30, 2023 12:50
-
-
Save n0nuser/9062dc1cd17def828bfa3b4364e7e162 to your computer and use it in GitHub Desktop.
Sync Directories with Rsync in Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM ADAPT TO YOUR LIKING | |
REM Change Drive if needed | |
F: | |
REM Change to parent folder of the one to be synced | |
cd "F:\Documents\" | |
REM Have installed WSL in order to launch bash | |
bash -c "rsync -avzh -P --stats MyFolder/ '[email protected]:/mnt/hdd/MyFolder'" | |
REM If another port is used | |
bash -c "rsync -avzh -P --stats --ignore-errors -e 'ssh -p 2222' MyFolder/ '[email protected]:/mnt/hdd/MyFolder'" | |
REM Pause to check script when finished | |
pause | |
REM ENJOY! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment