# how to batch copy files in folders



## godfather_77 (Nov 29, 2007)

Hello all, I hope this is the right forum area. I have a lot of folders containing files. i would like to extract all the files from these different folders into one folder. I know how to do it the click and open way but that takes a long time. Is there program or method of selecting folders and choosing to extract the contents without having to open it? In a sense I am asking if I can open all the selected folders as a batch. Sorry if this is a stupid question. 
I am using XP SP3


----------



## Elvandil (Aug 1, 2003)

I use Copy All To One.


----------



## devil_himself (Apr 7, 2007)

Here's A Batch File


```
@echo off
setlocal
set source=c:\source
set dest=c:\dest
pushd "%source%"
for /f "tokens=*" %%a in ('dir /b /a-d /s 2^>NUL') do copy "%%a" "%dest%
popd
```


----------



## n2gun (Mar 3, 2000)

Also you can go to folder you want to copy hit *ctrl-a* (select all) then *ctrl-c* (copy) then go to folder you want to copy them to and hit *ctrl-v* (paste) This should copy them in that folder for you.


----------

