Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 40,624 of 42,547    |
|    foxidrive to Bob    |
|    Re: Incremental copy from batch    |
|    15 Apr 13 23:55:11    |
      From: not@this.address.invalid              On 15/04/2013 11:35 PM, Bob wrote:       > On 4/15/2013 5:55 AM, Ghoraq wrote:       >> Dear new alt.msdos.batch and alt.msdos.batch.nt readers,       >> I need to synchronize 2 folders to make scheduled copies on my server to       >> a nas.       > Stefano, you mention 2 folders but in your example you show only the 1       > source folder of d:\userdata so you'll need a second Robocopy line       > unless the 2nd folder you refer to is a sub-folder of d:\userdata              This is the network location of the target folder, Bob.              \\192.168.0.31\share\bk-srvcont\daily\$gior\userdata\                     >> Then i created a batch using that execute a robocopy script, performs an       >> incremental copy of the folders.       >> The batch is copydaily.bat and include the following command:       >>       >> powershell.exe -ExecutionPolicy unrestricted -file "d:\batch\daily.ps1"       >>       >> Then, there's the script with these rows:       >>       >> $day = Get-Date -Uformat %a       >> robocopy d:\userdata       >> \\192.168.0.31\share\bk-srvcont\daily\$gior\userdata\ /mir /r:0 /XA:SH       >> /fft /XJ /log:"D:\batch\log\daily.log"                                   --       foxi              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca