Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am trying to make a script to copy the users local files every 6 hours. I got one that works but I want to modify it so that it only does differential copies to save disk space. Here is the code I have...
@echo off
Set Monthfolder=Monthly\%Date:~-4,4%-%Date:~-10,2%
Set Dailyfolder=Daily\%Date:~-4,4%-%Date:~-10,2%\%Time:~-11,2%;%Time:~-8,2%;%Time:~-5,2%@echo Backing up local files...
@\\10.100.100.7\scripts\robocopy "%userprofile%" \\10.100.100.7\backups\userfiles\%username%\%Dailyfolder% *.do* /if *.xl* /if *.pdf /if *.pp* /if *.txt /XD %userprofile%\AppData /XD "%userprofile%\Application Data" /s /COPY:DAT /r:1 /w:1 /np > h:\BackupLog.txt
@\\10.100.100.7\scripts\robocopy "%userprofile%" \\10.100.100.7\backups\userfiles\%username%\%monthfolder% *.pst* /XD %userprofile%\AppData /XD "%userprofile%\Application Data" /s /COPY:DAT /r:1 /w:1 /np >> h:\BackupLog.txtNeed a robocopy expert.

Try tossing the "/xo" argument in your string. That will only copy files newer than the destination version.

I need it to compair with an old directory or a master copy and only backup the files that where changed like a differential but more of a shadow copy.

Ok, after thinking about this what I have come with is that I need to somehow log what was backed up and compare the date time for changes and only backup what has changed. So not just a differential but a shadow copy.

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |