PDA

View Full Version : Simple folder sync


Bill W
November 22nd 09, 09:30 PM
Periodically during the day, I would like to copy the contents of a folder
(with subfolders) from one computer (source) to two other computers on a
home network. It's really nothing more than a simple sync of files because
the data in the folder is only changed by the source computer, but used by
the two other computers. I would like to schedule the sync to occur maybe 3
times per day. The job could run on the source and "push" the folder to the
other 2 computers or each computer could have their own job and pull the
folder. I would prefer the second solution because the source computer is
always on, but the other 2 computers may not be on all the time. I've
considered a simple DOS copy that could be scheduled to run at different
times during the day, but I'm quite rusty on setting up the .EXE file and
scheduling it to run. Does anyone have a suggestion as to how I might
accomplish this simple sync? The source computer is running XP and the
other 2 computers are running XP and Vista. Thank you.

Pegasus [MVP]
November 22nd 09, 10:03 PM
"Bill W" > wrote in message
...
> Periodically during the day, I would like to copy the contents of a folder
> (with subfolders) from one computer (source) to two other computers on a
> home network. It's really nothing more than a simple sync of files
> because the data in the folder is only changed by the source computer, but
> used by the two other computers. I would like to schedule the sync to
> occur maybe 3 times per day. The job could run on the source and "push"
> the folder to the other 2 computers or each computer could have their own
> job and pull the folder. I would prefer the second solution because the
> source computer is always on, but the other 2 computers may not be on all
> the time. I've considered a simple DOS copy that could be scheduled to
> run at different times during the day, but I'm quite rusty on setting up
> the .EXE file and scheduling it to run. Does anyone have a suggestion as
> to how I might accomplish this simple sync? The source computer is
> running XP and the other 2 computers are running XP and Vista. Thank you.

Copy the two lines of code below into the file "Sync.bat" in a suitable
folder on each of the two target PCs, then use the Task Scheduler on each of
these PCs to run Sync.bat three times each day.
@echo off
robocopy /s /np /r:1 /w:1 "\\SourcePC\SomeShare\SomeFolder"
"c:\SomeFolder\SomeSubfolder" *.* /log:"c:\Sync.txt"

Please note:
- You may have to create one or more shares on the source computer.
- The above code will *not* delete files that only exist in the target
folder.
- The code only copy new or modified files. It won't touch files on the
target machine that are more recent than on the source PC.
- You must test the code from a Command Prompt before scheduling it with the
Task Scheduler.
- You must examine the log file c:\Sync.txt the first few times to ensure
that the job works as it should.
- When scheduling the task you must use an account that has a non-blank
password.
- The account/password used for the scheduled task must match an
account/password on each of the other machines. The preferred technique is
to create a dedicated account called "Scheduler".
- You can download robocopy.exe from here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en.
You should store it in the Windows or the System32 folder.

Bill W[_2_]
November 22nd 09, 10:36 PM
Thank you for a very comprehensive and applicable reply. This is exactly
what I needed. Thank you again. I really appreciate it.


"Pegasus [MVP]" > wrote in message
...
>
> "Bill W" > wrote in message
> ...
>> Periodically during the day, I would like to copy the contents of a
>> folder (with subfolders) from one computer (source) to two other
>> computers on a home network. It's really nothing more than a simple sync
>> of files because the data in the folder is only changed by the source
>> computer, but used by the two other computers. I would like to schedule
>> the sync to occur maybe 3 times per day. The job could run on the source
>> and "push" the folder to the other 2 computers or each computer could
>> have their own job and pull the folder. I would prefer the second
>> solution because the source computer is always on, but the other 2
>> computers may not be on all the time. I've considered a simple DOS copy
>> that could be scheduled to run at different times during the day, but I'm
>> quite rusty on setting up the .EXE file and scheduling it to run. Does
>> anyone have a suggestion as to how I might accomplish this simple sync?
>> The source computer is running XP and the other 2 computers are running
>> XP and Vista. Thank you.
>
> Copy the two lines of code below into the file "Sync.bat" in a suitable
> folder on each of the two target PCs, then use the Task Scheduler on each
> of these PCs to run Sync.bat three times each day.
> @echo off
> robocopy /s /np /r:1 /w:1 "\\SourcePC\SomeShare\SomeFolder"
> "c:\SomeFolder\SomeSubfolder" *.* /log:"c:\Sync.txt"
>
> Please note:
> - You may have to create one or more shares on the source computer.
> - The above code will *not* delete files that only exist in the target
> folder.
> - The code only copy new or modified files. It won't touch files on the
> target machine that are more recent than on the source PC.
> - You must test the code from a Command Prompt before scheduling it with
> the Task Scheduler.
> - You must examine the log file c:\Sync.txt the first few times to ensure
> that the job works as it should.
> - When scheduling the task you must use an account that has a non-blank
> password.
> - The account/password used for the scheduled task must match an
> account/password on each of the other machines. The preferred technique is
> to create a dedicated account called "Scheduler".
> - You can download robocopy.exe from here:
> http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en.
> You should store it in the Windows or the System32 folder.
>

Pegasus [MVP]
November 22nd 09, 10:58 PM
"Bill W" <xxx@xxx> wrote in message
...
> Thank you for a very comprehensive and applicable reply. This is exactly
> what I needed. Thank you again. I really appreciate it.

Thanks for the feedback.

Terry R.[_2_]
November 23rd 09, 03:42 PM
On 11/22/2009 1:30 PM On a whim, Bill W pounded out on the keyboard

> Periodically during the day, I would like to copy the contents of a folder
> (with subfolders) from one computer (source) to two other computers on a
> home network. It's really nothing more than a simple sync of files because
> the data in the folder is only changed by the source computer, but used by
> the two other computers. I would like to schedule the sync to occur maybe 3
> times per day. The job could run on the source and "push" the folder to the
> other 2 computers or each computer could have their own job and pull the
> folder. I would prefer the second solution because the source computer is
> always on, but the other 2 computers may not be on all the time. I've
> considered a simple DOS copy that could be scheduled to run at different
> times during the day, but I'm quite rusty on setting up the .EXE file and
> scheduling it to run. Does anyone have a suggestion as to how I might
> accomplish this simple sync? The source computer is running XP and the
> other 2 computers are running XP and Vista. Thank you.
>

Hi Bill,

I use a batch file to copy new and modified files from one hard drive to
another each evening also. About once a month I use a program called
Tarylynn to sync them. It's fast and free. Google it. No command line
unfortunately, but I only spend about two minutes in the GUI while it
does its work.


Terry R.
--
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.

Bill W
November 24th 09, 01:48 PM
Thank you, Terry. I appreciate the suggestion. I'll look into Tarylynn.
Thanks again.


"Terry R." > wrote in message
...
> On 11/22/2009 1:30 PM On a whim, Bill W pounded out on the keyboard
>
>> Periodically during the day, I would like to copy the contents of a
>> folder
>> (with subfolders) from one computer (source) to two other computers on a
>> home network. It's really nothing more than a simple sync of files
>> because
>> the data in the folder is only changed by the source computer, but used
>> by
>> the two other computers. I would like to schedule the sync to occur
>> maybe 3
>> times per day. The job could run on the source and "push" the folder to
>> the
>> other 2 computers or each computer could have their own job and pull the
>> folder. I would prefer the second solution because the source computer
>> is
>> always on, but the other 2 computers may not be on all the time. I've
>> considered a simple DOS copy that could be scheduled to run at different
>> times during the day, but I'm quite rusty on setting up the .EXE file and
>> scheduling it to run. Does anyone have a suggestion as to how I might
>> accomplish this simple sync? The source computer is running XP and the
>> other 2 computers are running XP and Vista. Thank you.
>>
>
> Hi Bill,
>
> I use a batch file to copy new and modified files from one hard drive to
> another each evening also. About once a month I use a program called
> Tarylynn to sync them. It's fast and free. Google it. No command line
> unfortunately, but I only spend about two minutes in the GUI while it does
> its work.
>
>
> Terry R.
> --
> Anti-spam measures are included in my email address.
> Delete NOSPAM from the email address after clicking Reply.

Terry R.[_2_]
November 24th 09, 08:31 PM
On 11/24/2009 5:48 AM On a whim, Bill W pounded out on the keyboard

> Thank you, Terry. I appreciate the suggestion. I'll look into Tarylynn.
> Thanks again.
>
>


You're welcome Bill.


Terry R.
--
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.

Google