New
#11
I'm looking to "COPY" all "files" from multiple folders of a HD (some of the folders also have sub-folders) to a USB thumb drive so that all the files, no folders, reside on the thumb drive.
I'm looking to "COPY" all "files" from multiple folders of a HD (some of the folders also have sub-folders) to a USB thumb drive so that all the files, no folders, reside on the thumb drive.
Get a tool like XXCOPY
http://www.xxcopy.com/index.htm
Use it to copy all the files to a single directory
eg
xxcopy source destination /s /sx
This would copy all files from the source, including subdirectories into a
single directory (destination)
If X: is the thumb drive and you want to copy to the root you could do like
for %s in (c:\folder1 d:\foldera\folderb c:\yuk) do rcopy /n %s\*.* X:\
unzip rcopy.zip to a folder in your path so you can rust type rcopy without the full path.
/n just means do not overwite if a destination file has the same name. See included Readme.txt
Edit: you could use a tool like RichCopy or xcopy or robocopy but for this you don't have to mess with switches(except for /n) as rcopy is always recursive.
With Xcopy how would I copy all files from the souse, regardless of what folders or sub-folders they are in, to one source?
And how would I do this with richcopy?
I don't know how to do that (or if it can be done) with xcopy without duplicating the folder structure.
But you can do it with xxcopy that is downloadable from Kaktussoft's link in post 12.
This command:
xxcopy /sr d:\temp d:\test
will copy all files from D temp to D test and omit the folder structure. The r in the command appends the name of the source folder to the right edge of the file on the destination, to avoid over-writing files in the source directory tree that happen to have identical file names.
So, a file named dog.jpg within the animals folder under D temp will be renamed to dog.jpg`animals on D test. And a file named dog.jpg within the pets folder on D temp will be renamed to dog.jpg`pets on D test. Otherwise, you'd either over-write or skip the second dog.jpg file if copying to a single folder.
You can later run xxcopy source destination /srr to reconstruct the folder structure if necessary.
If you change the command to
xxcopy /s d:\temp d:\test
the folder structure will be included.
I only used RichCopy once to copy Windows.old over the network. You can get it here:
RichCopy - Free download and software reviews - CNET Download.com
For what it can do and how you need to read the documentation. But it's a good free tool for the toolbox.
I finally found a solution to my original post! It moves files from nested folders and disorganized locations. It will move any files, regardless of location or level of folder nesting. It copy's the files by extension type and worked great for organizing and moving my music file collection.
https://youtu.be/BAKIBQvKafE
Copy-By-Extension | "Automatically & Easily Copy or Move Files" Regardless of Location or Drive/Folder Structure!
Last edited by badspell68; 30 Jun 2015 at 21:03.
move %USERPROFILE%\AppData\Roaming\Mozilla S:\Users\%USERNAME%\AppData\Roaming\Mozilla
I want to run this command but the destination directory and path doesn't exist. I want to create it by cmd but I want to move only files and folders in "Mozilla" folder. Is it possible?
It is a useful way to keep write down to a SSD. I'm going to use it along with those commands:
mklink /j %USERPROFILE%\AppData\Roaming\Mozilla S:\Users\%USERNAME%\AppData\Roaming\Mozilla
mklink /j %USERPROFILE%\AppData\Local\Mozilla S:\Users\%USERNAME%\AppData\Local\Mozilla
Why not just move the Mozilla folder and execute the junction command?
I need to do it by cmd because I want to do it in many pc's with SSD. I want a practical and automatic way to do it because It cost me more time.
Also the script I'll make will be executed for every new user that it is created in each pc.