The Computer Oracle

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


  1. Make a selection of the files and folders you want to move.
  2. Right click, choose cut
  3. Go to the parent folder
  4. 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:

  1. Press F3 to open the search dialog (or if you have Windows 7+ it will move the cursor to the search bar)
  2. Type in *.* and press enter.
  3. 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.
  4. Select all files using Ctrl + A
  5. Right click, choose cut
  6. Move to the parent folder by first pressing back to exit the search and then another time to go to the parent folder
  7. 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 9


From a command prompt:

Move c:\parentFolder\subFolder\*.* c:\parentFolder




ANSWER 4

Score 1


There is no out-of-the-box solution for this. Use a simple drag-and-drop technique:

  1. Select the files you want to move
  2. Drag to the destination folder
  3. Drop them