# Windows - How to move all files in subfolders to a parent folder? [closed]

Can you show me how to move all files in sub-folder to the parent folder?

## closed as unclear what you're asking by bwDraco, fixer1234, DavidPostill♦, mdpc, ᔕᖺᘎᕊFeb 9 '15 at 7:16

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• It is hard to imagine what type of difficulty you are experiencing. Can you explain how you are trying to do it and what doesn't work? Are you using a command line? Windows Explorer? – fixer1234 Feb 7 '15 at 1:35
• Not sure why this was downvoted and closed as "unclear". It sounds pretty clear to me. – Cornwell May 8 '15 at 11:03
• HOW IS THIS UNCLEAR? @fixer1234 – Don Larynx May 28 '15 at 17:35
• @DonLarynx: Moving files is a trivial task and there are myriad ways. Anyone would be hard pressed to be unable to find even a single method to accomplish it. The question implies that the OP has specific requirements or constraints (which are not described), that make whatever methods he tried (which are not described), unsatisfactory in some way (which are not described). That's what's unclear. If this is not a request for a solution specific to a particular problem or constraints, the question is a call to describe every possible way to move files, which is overly broad. – fixer1234 May 28 '15 at 18:01

## 5 Answers

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.
• Personally, I like the batch solutions because I don't have to wait for the search function to finish. However, this is probably the easiest for a casual user. – Engineer Toast Feb 6 '15 at 14:07

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)

• for is surely a good thing to use to, but using for /r %cd% %i in (.) do move /y %i c:\foo\bar could be better. Sorry the code could not be formatted I don't know why. – Jamie Apr 27 '14 at 12:48
• Sure, /R would be helpful if there are several layers of sub-dirs that also need their contents moved. – Snewsley Pies Apr 27 '14 at 12:50
• Hope it helps, @SnewsleyPies! – Jamie Apr 27 '14 at 12:51
• I'm having trouble understanding this code. I'm assuming the F used is the for command's switch for folder contents, but if so, why is it not /F rather than %F? What's the purpose of the percent sign? – Hashim Nov 16 '16 at 22:52

From a command prompt:

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

• This assumes only one subfolder with files that need to be extracted from it. If that was the case, the OP probably wouldn't be looking for an automated solution when they could just cut and paste in a few seconds. – Hashim Nov 16 '16 at 22:48
1. 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)

2. 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.

3. Select all the items you want to move and drag/drop them into the parent folder.

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