Page 2 of 2

Re: Copying files

Posted: 23 Nov 2009 14:22
by joan28
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.

Re: Copying files

Posted: 23 Nov 2009 14:34
by admin
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.

Re: Copying files

Posted: 23 Nov 2009 17:56
by PeterH
Hey - the thing with empty root= (using the drive as subdirectory) is very fine :D

Re: Copying files

Posted: 25 Nov 2009 00:25
by joan28
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).
Ahhh, ok.
Sorry I have missed such obvious thing.
And it is very flexible definitely.
Amazing, thx :)