Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Can I move files from nested folders with a single command?

09 May 2014   #11
badspell68

Windows 7
 
 

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.


My System SpecsSystem Spec
.
09 May 2014   #12
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

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)
My System SpecsSystem Spec
09 May 2014   #13
MilesAhead

Windows 7 32 bit
 
 

Quote   Quote: Originally Posted by badspell68 View Post
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.
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.
My System SpecsSystem Spec
.

10 May 2014   #14
badspell68

Windows 7
 
 

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?
My System SpecsSystem Spec
10 May 2014   #15
ignatzatsonic

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium SP1, 64-bit
 
 

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.
My System SpecsSystem Spec
10 May 2014   #16
MilesAhead

Windows 7 32 bit
 
 

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.
My System SpecsSystem Spec
28 Apr 2015   #17
badspell68

Windows 7
 
 

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!
My System SpecsSystem Spec
20 Jun 2015   #18
stsaerox

Windows 7 Home premium x64
 
 

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
My System SpecsSystem Spec
20 Jun 2015   #19
GokAy

Windows 7 Ultimate x64 SP1
 
 

Why not just move the Mozilla folder and execute the junction command?
My System SpecsSystem Spec
20 Jun 2015   #20
stsaerox

Windows 7 Home premium x64
 
 

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.
My System SpecsSystem Spec
Reply

 Can I move files from nested folders with a single command?




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
How to copy multiple .wma files in different folders to single folder?
I need to 'extract' .wma files from within many different folders to a single, main folder. It looks like this: Main Folder>Artist>Album>Track (.wma) but there are many artists. I want to get all the tracks from within the two subfolders into a single folder. I've searched around online and haven't...
Music, Pictures & Video
I need to move thousands of files from one folder to new folders
I need to figure out a way to take thousands of .dwg,.docx,.xlsx, ect. files and organize them all into folders. I want to take file named 54321.xlsx and 54321.docx and put them in the folder 54321. Right now all my .docx files are in a folder, but I want them all seperated by seperate folders. ...
Software
Can't move folders with files, but can move files
I am attempting to move folders and files around, doing a little organization on my HDD. However if I attempt to move the loaded folder I get the error message " The action can't be completed because the folder or a file in it is open in another program." However I have no other programs open,...
General Discussion
Nested Application Folders Directory (many times)
I re-installed Windows 7 so that I could run a 64bit version instead of the 32bit version. When I searched for old user files in Windows.old so that I could restore old favorites and documents, I found that All Users\Application Data had Application Data nested underneath it and that repeated many...
General Discussion
Nested folders in Favorites in Navigation Pane
Hi, I was wondering if it was possible to make the folders nested in the Favorites of the Navigation Pane. AFAIK nested folders work in both Libraries and Computer of the Navigation Pane, however when moved to Favorites they are just a simple link. I've Googled a bit and all signs point to no...
General Discussion
automatically delete/move files to folders
hi all! is there something like a handy method to automatically move files depending on their extension to custom folders? (either by the time they are generated or at a specific date). ps: b.) i would be also interested in finding a method to have windows7 delete files in custom folders at a...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 16:15.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App