joan28 wrote:Such root definition makes a solution not universal or I have missed something.
In the example there are files from one folder and subfolder.
Let's say we have files to copy or move like in this example:
Code: Select all
C:\Temp\test.txt
C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe
C:\WINDOWS\twain.dll
Consider also, all have different extensions so any mask like *.jpg is useless.
This is why the most generic is a list of files.
The only function of the root definition is to define which parts of the source directory structures you want to mirror in the target (resp.
not to mirror because the root is the part that is not mirrored). Compare:
Input:
Code: Select all
target=E:\
root=C:\
C:\Temp\test.txt
C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe
C:\WINDOWS\twain.dll
Output:
Code: Select all
E:\Temp\test.txt
E:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe
E:\WINDOWS\twain.dll
Input:
Code: Select all
target=E:\
root=
C:\Temp\test.txt
C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe
C:\WINDOWS\twain.dll
Output (
now C is also recreated in the target!):
Code: Select all
E:\C\Temp\test.txt
E:\C\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe
E:\C\WINDOWS\twain.dll
Note: If the root is not shared by all items in the list then it's probably not useful to employ it. But OTOH in that case (no common root) you might get name collisions in the target, so it's a risky list anyway.