NOTE: I am using Free File Sync on a Windows computer, and in this post I am using the terms "folder" and "subfolder" whereas others may wish to use the term "directory" or "sub-directory".
I have used Free File Sync for many years and have never encountered anything that I couldn't work out myself.
Now I have a scenario (use case) where I want to sync all *.pdf files in all subfolders of a specific folder.
The source heirarchy is for example:
C:\FolderA\SubfolderAA\SubFolderAAA\SubfolderAAAA\SubFolderAAAAA
C:\FolderA\SubfolderAA\SubFolderBBB\SubfolderBBBB\SubFolderBBBBB
C:\FolderA\SubfolderAA\SubFolderCCC\SubfolderCCCC\SubFolderCCCCC
etc.
The destination folder is for example:
C:\FolderZ\PDFs
I want to sync all *.pdf files in:
C:\FolderA\SubfolderAA\SubFolderAAA
C:\FolderA\SubfolderAA\SubFolderBBB
C:\FolderA\SubfolderAA\SubFolderCCC
with the destination folder, and exclude any subfolders below those folders, e.g. SubfolderAAAA, SubfolderBBBB, etc.
I have tried many times to configure FFS to copy all PDF files from a subfolder of a particular folder into another folder without being able to achieve the task.
I've tried using all various Filters (Include, Exclude), and Sync modes (Two-way, Update, Mirror, Custom) with no success.
There was another post related to this one that was inconclusive, so I'm creating a new post.
Perhaps someone in this forum is able to tell me how to achieve my requirement?
Sync all *.pdf files in all subfolders of a specific folder, but not subfolders below that folder
- Posts: 7
- Joined: 26 Jul 2022
-
- Posts: 2978
- Joined: 22 Aug 2012
Effectively, you are describing two unrelated aspects:
1) As you describe it, you seem to want to consolidate all *.pfd files in all subfolders of C:\FolderA\SubfolderAA\ into one and the same single folder C:\FolderZ\PDFs.
If the number of subfolders of C:\FolderA\SubfolderAA is undetermined, this is not possible with FreeFileSync (FFS).
1a) However, you can define a left-right base folder pair
C:\FolderA\SubfolderAA\ => C:\FolderZ\PDFs
This will sync all subfolders of C:\FolderA\SubfolderAA\ as subfolders into C:\FolderZ\PDFs.
So, C:\FolderA\SubfolderAA\SubFolderAAA will sync to C:\FolderZ\PDFs\SubFolderAAA,
C:\FolderA\SubfolderAA\SubFolderBBB will sync to C:\FolderZ\PDFs\SubFolderBBB
etc.
1b) If C:\FolderA\SubfolderAA\ has a limited number of fixed subfolders, you can sync all *.pfd files of the direct subfolders of C:\FolderA\SubfolderAA\ all into one and the same folder C:\FolderZ\PDFs by defining multiple left-right folder pairs (using the "+" icon in front of a left-right folder pair), e.g.
C:\FolderA\SubfolderAA\SubFolderAAA => C:\FolderZ\PDFs
C:\FolderA\SubfolderAA\SubFolderBBB => C:\FolderZ\PDFs
C:\FolderA\SubfolderAA\SubFolderCCC => C:\FolderZ\PDFs
But note that with this approach you may run into conflicts and potential loss of data if you have identically named pdf-files in the SubfolderAA subfolders.
2) Proper In- and Exclude Filter definitions
This needs to be split up between the above cases 1a) and 1b)
2a) In its simplest form you should replace the default Include Filter rule * (=everything) by *.pdf. However, if you don't want to include any pdf-files that may be comprised in SubfolderAA itself, you need to replace the default Include Filter rule * (=everything) by *\*.pdf (as opposed to by *.pdf).
In order to exclude any pdf-files residing in sub-subfolders of C:\FolderA\SubfolderAA\, you need to add an Exclude Filter rule *\*\*.pdf or simply *\*\*.
2b) You need to replace the default Include Filter rule * (=everything) by *.pdf and add an Exclude Filter rule *\*.pdf or simply *\*.
1) As you describe it, you seem to want to consolidate all *.pfd files in all subfolders of C:\FolderA\SubfolderAA\ into one and the same single folder C:\FolderZ\PDFs.
If the number of subfolders of C:\FolderA\SubfolderAA is undetermined, this is not possible with FreeFileSync (FFS).
1a) However, you can define a left-right base folder pair
C:\FolderA\SubfolderAA\ => C:\FolderZ\PDFs
This will sync all subfolders of C:\FolderA\SubfolderAA\ as subfolders into C:\FolderZ\PDFs.
So, C:\FolderA\SubfolderAA\SubFolderAAA will sync to C:\FolderZ\PDFs\SubFolderAAA,
C:\FolderA\SubfolderAA\SubFolderBBB will sync to C:\FolderZ\PDFs\SubFolderBBB
etc.
1b) If C:\FolderA\SubfolderAA\ has a limited number of fixed subfolders, you can sync all *.pfd files of the direct subfolders of C:\FolderA\SubfolderAA\ all into one and the same folder C:\FolderZ\PDFs by defining multiple left-right folder pairs (using the "+" icon in front of a left-right folder pair), e.g.
C:\FolderA\SubfolderAA\SubFolderAAA => C:\FolderZ\PDFs
C:\FolderA\SubfolderAA\SubFolderBBB => C:\FolderZ\PDFs
C:\FolderA\SubfolderAA\SubFolderCCC => C:\FolderZ\PDFs
But note that with this approach you may run into conflicts and potential loss of data if you have identically named pdf-files in the SubfolderAA subfolders.
2) Proper In- and Exclude Filter definitions
This needs to be split up between the above cases 1a) and 1b)
2a) In its simplest form you should replace the default Include Filter rule * (=everything) by *.pdf. However, if you don't want to include any pdf-files that may be comprised in SubfolderAA itself, you need to replace the default Include Filter rule * (=everything) by *\*.pdf (as opposed to by *.pdf).
In order to exclude any pdf-files residing in sub-subfolders of C:\FolderA\SubfolderAA\, you need to add an Exclude Filter rule *\*\*.pdf or simply *\*\*.
2b) You need to replace the default Include Filter rule * (=everything) by *.pdf and add an Exclude Filter rule *\*.pdf or simply *\*.
- Posts: 7
- Joined: 26 Jul 2022
Thanks for your very detailed reply, Plerry.
I think you've hit the "nail on the head" with the statement "this is not possible with FreeFileSync".
As I had said in my original post, I've tried various options with no success.
Free File Sync (FFS) is a great software tool, but it can't cover every scenario.
I'm in the process of writing a PowerShell script that will do exactly what I want.
I'll continue to use FFS for other tasks, but not for this one.
I think you've hit the "nail on the head" with the statement "this is not possible with FreeFileSync".
As I had said in my original post, I've tried various options with no success.
Free File Sync (FFS) is a great software tool, but it can't cover every scenario.
I'm in the process of writing a PowerShell script that will do exactly what I want.
I'll continue to use FFS for other tasks, but not for this one.
-
- Posts: 2978
- Joined: 22 Aug 2012
> Free File Sync (FFS) is a great software tool, but it can't cover every scenario.
FreeFileSync is, as its name already suggests, a synchronization program.
Your intended use-case, copying files from multiple sources to one and the same destination, is not a synchronization.
And as stated before, you may run into conflicts and potential loss of data if you have identically named files in two or more of your multiple sources.
FreeFileSync is, as its name already suggests, a synchronization program.
Your intended use-case, copying files from multiple sources to one and the same destination, is not a synchronization.
And as stated before, you may run into conflicts and potential loss of data if you have identically named files in two or more of your multiple sources.
- Posts: 1222
- Joined: 8 May 2006
For finding files, there is nothing better then Everything.
Find pdf's in the 4th directory level.
Find pdf's in the 4th directory level & have the string "docs" in a directory or file name.
Find pdf's in the 4th directory level that contain both "irs" & "fed", but not "pub 15".
3rd or 4th directory level, parents:3-4.
Mix & match, sort, filter even more...
Once found, you can simply drag & drop, if that suffices, or export, or SendTo, or...
(Duplicate names or what not, you'd need to account for...)
(Windows. I'm point to 1.5 alpha cause it is so much more powerful compared to 1.4 release, which is still worlds above anything else, https://www.voidtools.com/forum/viewtopic.php?t=9787.)
.
Find pdf's in the 4th directory level.
Find pdf's in the 4th directory level & have the string "docs" in a directory or file name.
Find pdf's in the 4th directory level that contain both "irs" & "fed", but not "pub 15".
3rd or 4th directory level, parents:3-4.
Mix & match, sort, filter even more...
Once found, you can simply drag & drop, if that suffices, or export, or SendTo, or...
(Duplicate names or what not, you'd need to account for...)
(Windows. I'm point to 1.5 alpha cause it is so much more powerful compared to 1.4 release, which is still worlds above anything else, https://www.voidtools.com/forum/viewtopic.php?t=9787.)
.
- Attachments
-
- Everything pdf 4 direcory levels deep.png (102.41 KiB) Viewed 149 times