Copying files

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
joan28
Posts: 12
Joined: 13 Nov 2009 22:16

Re: Copying files

Post 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.

admin
Site Admin
Posts: 66324
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copying files

Post 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.

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Copying files

Post by PeterH »

Hey - the thing with empty root= (using the drive as subdirectory) is very fine :D

joan28
Posts: 12
Joined: 13 Nov 2009 22:16

Re: Copying files

Post 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 :)

Post Reply