# [SOLVED] Copy files from multiple sub-folders to 1 folder



## MohtasaUnique (Sep 9, 2010)

Ok so I recently downloaded a giant ZIP file that contains all the material I'm going to need for my college course. I come to find after unpacking the ZIP that each individual file is, for some reason, split up into subfolders. I was wondering if it's possible to compress/compile all the folders and their content into one single folder.

Thanks for the help


----------



## jcgriff2 (Sep 30, 2007)

*re: Copy files from multiple sub-folders to 1 folder*

Hi - 

Create the new destination folder (this example = k:\1folder).

This command copies all files found in c:\test to k:\1folder.

Bring up elevated cmd/DOS prompt - 
START | type *cmd.exe* | RIGHT-click on cmd.exe above under "Programs" | select "Run as Administrator | Paste this command -

```
[font=lucida console][color=#000033]
for /f "tokens=*" %a in ('dir /b /s /a-d "c:\test"') do @copy "%a" "k:\1folder"[/color][/font]
```
Change origin and destination folder names.

Regards. . .

jcgriff2

`


----------



## MohtasaUnique (Sep 9, 2010)

*Re: Copy files from multiple sub-folders to 1 folder*

Thank you for the reply, my problems solved now though! I totally found an extremely simple solution: move all folders into one folder, and search within that one folder for all of the .mobi files. Since they were all .mobi, a search result showed them all, and I was able to select them all from there and put them into one folder.


----------



## jcgriff2 (Sep 30, 2007)

*Re: Copy files from multiple sub-folders to 1 folder*

Glad you got it sorted out.

Good Luck to you.

jcgriff2

`


----------

