Windows - How to move all files in subfolders to a parent folder?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Magical Minnie Puzzles
--
Chapters
00:00 Windows - How To Move All Files In Subfolders To A Parent Folder?
00:14 Accepted Answer Score 78
01:13 Answer 2 Score 29
01:45 Answer 3 Score 10
02:30 Answer 4 Score 9
02:44 Answer 5 Score 1
02:59 Thank you
--
Full question
https://superuser.com/questions/746632/w...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windows
#avk47
ACCEPTED ANSWER
Score 78
- Make a selection of the files and folders you want to move.
- Right click, choose cut
- Go to the parent folder
- Right Click on some empty space and choose paste.
If the subfolder in question has multiple subfolders and you want to move all the files without their subfolder structure in tact, do the following:
- Press F3 to open the search dialog (or if you have Windows 7+ it will move the cursor to the search bar)
- Type in
*.*
and press enter. - Wait for the search to complete. Note that it can appear to be done and then suddenly it finds more files. There is no notification when the search is complete other than a bar saying: Search again in, which appears at the bottom of the search results.
- Select all files using Ctrl + A
- Right click, choose cut
- Move to the parent folder by first pressing back to exit the search and then another time to go to the parent folder
- Right click an empty place and choose paste.
ANSWER 2
Score 29
Use the 'for' command: open a command window, then use something like the following, assuming you have files in c:\foo\bar\ and want to move them to c:\foo\ :
for %F in (c:\foo\bar\*.*) do move /Y %F c:\foo
The /Y switch turns off confirmation; remove it if you want to confirm each file move.
edit: if you want to save this into a batch file and run it from the parent folder, you can, but you need to double-up the percent signs (i.e. %F becomes %%F)
ANSWER 3
Score 10
In Windows Explorer - browse to the parent folder and use the search dialog to search for * which will return you all the files in the parent and subfolders. (Or if you know you only want to return specific items from subfolders, then limit the search as you wish. For instance, if you just wanted to move .jpg files you could search for *.jpg)
In the search results set it to show details and sort by the folder path column (you may have to add it to your columns displayed). This makes it easier to select all the items that are not in the parent folder path.
Select all the items you want to move and drag/drop them into the parent folder.
ANSWER 4
Score 9
From a command prompt:
Move c:\parentFolder\subFolder\*.* c:\parentFolder
ANSWER 5
Score 1
There is no out-of-the-box solution for this. Use a simple drag-and-drop technique:
- Select the files you want to move
- Drag to the destination folder
- Drop them