1.

Solve : copying only files and not the directory structure?

Answer»

I am trying to figure out a way to copy FILES from a multi structured directory such as EXAMPLE
(c:\dir1\dirA\dirB\*.*) to another directory copying only files and not the directory structure such as going from c:\dir1\dirA\dirB\*.* to c:\dirC. This would also have to take into concideration that the directory structure constantly changes. ANY IDEAS??? PLEASE HELPWithout you MENTIONING an OS, I can only guess, but this may work:

Code: [Select]@echo off
for /f "tokens=1*" %%i in ('dir /b /s /a:-d c:\dir1\*.*') do copy %%i c:\dirC

Hope this HELPS. 8-)



Discussion

No Comment Found