<p>I have a directory with several subdirectories with files.<br>
How can I copy all files in the subdirectories to a new location?<br></p>

<p><strong>Edit:</strong> I do not want to copy the directories, just the files...</p>

<p>As this is still on XP, I chose the below solution:</p>

<pre><code> for /D %S IN ("src\*.*") DO  @COPY "%S\" "dest\"
</code></pre>

<p>Thanks!</p>

The Xcopy command should help here.
```
```
XCOPY /E SrcDir\*.* DestDir\
```
```
Or if you don't want any of the files in SrcDir, just the sub directories, you can use XCOPY in conjunction with the FOR command:
```
```
FOR /D %s IN (SrcDir\*) DO @XCOPY /E %s DestDir\%~ns\
```
```