Sync file to base path

Get help for specific problems
Posts: 1
Joined: 9 Aug 2013

hkhansen

Hi,

Is there a way to sync a file to the right base path leaving out the relative path?

Example: Copy the C:\Temp\FOLDER\File.txt file to D:\Temp\File.txt
- Left base path: C:\Temp
- Left relative path: FOLDER
- Left full path: C:\Temp\FOLDER
- Left file name: File.txt
- Right base path: D:\Temp
- LEAVE OUT the right relative path: FOLDER

Looking forward to answers.
Thanks in advance.
User avatar
Posts: 2286
Joined: 22 Aug 2012

Plerry

If you sync left location C:\folderA\folderB\folderC\ to right location D\folderE\,
all files and (sub)folders of C:\folderA\folderB\folderC\ will sync to D\folderE\ in their folder tree,
relative to the left, respectively right “base” locations. Thus:
a file C:\folderA\folderB\folderC\fileA.txt would sync to D\folderE \fileA.txt,
a file C:\folderA\folderB\folderC\folderF\fileB.txt would sync to D\folderE \folderF\fileB.txt, and
a file C:\folderA\folderB\folderC\folderG\folderH\fileC.txt would sync to D\folderE\folderG\folderH\fileC.txt

If this is your intended mode of use, you can simply define C:\Temp\FOLDER\ as your left location, and D:\Temp\ as your left location.

If you intend to sync all files in C:\Temp\ and its (sub)folders to the “base” of D:\Temp\ (without their (sub)folder tree structure), you might define multiple left-right folder pairs for your sync (the “+” symbol left of your left location).
By e.g. defining location pair 1 left C:\Temp\ , right D:\Temp\ ; pair 2 left C:\Temp\folderA , right D:\Temp\ ; pair 3 left C:\Temp\folderB , right D:\Temp ; pair 4 left C:\Temp\folderC\folderD\ , right D:\Temp\ ; etc. ,and excluding all subfolders from the sync (e.g. via the exclude filter *\* ) you would sync:
C:\Temp\fileA.txt to D:\Temp\fileA.txt,
C:\Temp\folderA\fileB.txt to D:\Temp\fileB.txt,
C:\Temp\folderB\fileC.txt to D:\Temp\fileC.txt,
C:\Temp\folderC\folderD\fileD.txt to D:\Temp\fileD.txt, …
This is however only practical for a limited number of (sub)folders in C:\Temp\ .
Whether such a sync makes “sense” is another discussion …