Page 1 of 1

Copy multiple files to new folder and keep the folders str..

Posted: 08 Feb 2012 02:52
by vsub
Is there is a way to copy multiple files from different sub folders to a new folder but to copy them into new folders with same names.

The script(has to work regardless of where the files are because I often rename the folder in which are the files.

For example,enter the folder where the files are(in sub folders),execute the code and copy the files into new folder in the the main folder

The root folder should be called for example root(the name does not matter because I change it from time to time.

root\1\file1.txt
root\file2.txt
root\1\2\3\file3.txt

and copy those files info
"root\new folder" and place them like this

root\new folder\1\file1.txt
root\new folder\file2.txt
root\new folder\1\2\3\file2.txt

I hope my explanation is god enough.

Also if XYP support some kind of compare\sync(by date\size or anything),is it possible when I compare two folder and if there is differences to copy the newer files to a new folder and again keep the folders structure.

Re: Copy multiple files to new folder and keep the folders s

Posted: 08 Feb 2012 03:04
by highend
Why do you need a script for this?

Select all your folders inside your root folder, rightlick on the selection, drag that selection
to some empty space in the same pane and then select "copy here to new subfolder..."
in the pop-up menu.

Re: Copy multiple files to new folder and keep the folders s

Posted: 08 Feb 2012 03:31
by vsub
nvm I found how.

mkdir new\1\
mkdir new\2\
mkdir new\2\3\
mkdir new\
copy /b 1\3.txt new\1\3.txt
copy /b 2\2.txt new\2\2.txt
copy /b 2\3\1.txt new\2\3\1.txt
copy /b 4.txt new\4.txt

Re: Copy multiple files to new folder and keep the folders s

Posted: 08 Feb 2012 10:11
by admin
vsub wrote:Is there is a way to copy multiple files from different sub folders to a new folder but to copy them into new folders with same names.
Sure, look up Rich Copy in the Help.

The latest enhancements on Rich Copy are explained here:
http://www.xyplorer.com/release_10.80.htm#arfo