Only sync base folders that exist on one side

Get help for specific problems
Posts: 8
Joined: 31 Jan 2022

Fred64

I have been trying to figure out how to do this for a while and I'm stumped.

I want to create saved FreeFileSync Batch job to run on demand
set up to sync C:\MyJobs with B:\AllJobs

Each side has lots of Job Folders.
/AllJobs Contain all the jobs (thousands).
/MyJobs contains a subset of /AllJobs, usually 30-50.

I need to sync (2way) the base folders that exist in /MyJobs with the corresponding folders in /AllJobs.

Assume /AllJobs has has base folders A thru Z. /MyJobs has base folders /D, /F, /G, /R
I only want /D, /F, /G and /R (and their subfolders) synced with /AllJobs
I can't do 1 way, because /D, /F, /G and /R in /AllJobs may have had changes too.
I can't do 2 way, because /MyJobs does not have enough space for all the jobs
Trying to list each folder in FreeFileSync Separately is not good because MyJobs has many folders and they change all the time.

On laptops /MyJobs has the jobs (Base Folders) they are working on. New Jobs get added and removed randomly across weeks/months. Each laptop has its own set of jobs, but some jobs may exist on more than one laptop.

/AllJobs is on the central PC with a very large Disk. Its jobs (Base folders) can be updated as well. There is not enough room for all the jobs on a laptop.

Any job can get changes, new docs, drawings, data, media etc. applied independently by one or more laptops or the central PC. So its important to keep the job folders in sync.

Operationally a particular job folder is copied to laptops when needed. There can be more than one laptop with the same job at any point in time. The laptops will regularly sync their job folders with the Central PC. When they are done with a job, They do one last sync and delete the job from the laptop.

A FreeFileSync job could really make this a whole lot easier. Any Ideas would be greatly appreciated.
User avatar
Posts: 3614
Joined: 11 Jun 2019

xCSxXenon

Filters
Posts: 8
Joined: 31 Jan 2022

Fred64

Filters... ?

Folder pair is c:\Data\MyJobs << >> F:\Data\AllJobs

Tried the filter
\Myjobs\* Found no files to sync but files existed on both sides to copy

I tried Changing the pair to C:\Data << >> F:\Data\All Jobs
using the filter
\MyJobs\* ... It wanted to create F:\AllJobs\MyJobs\C, F, K, R and all their files

I tried Changing the pair to C:\Data << >> F:\Data
using the filter
\MyJobs\* ... It wanted to create C:\Data\A, B, C...Z




Could you elaborate?
How do I get only the folder indicated to do a 2 way sync?

AllJobs MyJobs
A
B
C <<>> C
D
E
F <<>> F
G
H
I
J
K <<>> K
L
M
N
O
P
Q
R <<>> R
S
T
U
V
W
X
Y
Z
Last edited by Fred64 on 26 Dec 2022, 23:10, edited 1 time in total.
Posts: 8
Joined: 31 Jan 2022

Fred64

Note the example above of folders, loses its tab spacing, when I submit it to the blog.
So I had to reverse the left and right sides for it to appear logically.
Myjobs is on the left side in FreeFileSync and AllJobs is on the right as described with the filter results.
User avatar
Posts: 2289
Joined: 22 Aug 2012

Plerry

Like xCSxXenon wrote (yet fairly condensely): use Filters.

Use the left-right base folder pair
C:\MyJobs <==> B:\AllJobs
And change you Include Filter from
*
(= everything in the left and right base location)
into
/D/*
/F/*
/G/*
/R/*
(= everything in the D, F, G and R folder and their subfolders)

And for your use-case: use a Two-way sync.
Posts: 8
Joined: 31 Jan 2022

Fred64

In the filter(s) described, I could just as easily set up directory pairs for each folder. Keep in mind we are talking a lot more than 4 folders.

And from one run to another those folders can change, next time MyJobs could be D, G, M, Q. So not really possible to create a batch job to sync MyJobs, I would have to go in and modify it to reflect the current folders. The only constant is it will always be all the folders in MYJobs.

I took a look at the XML code in the related .FFS file. It looks like each folder pair defined has a set format. It might be possible in a batch script to create the XML on the fly. If I can find some time I'll check into that. I wonder if there is a limit on the number of folder pairs?