Mike wrote:
> Hi;
>
> I want to search a directory tree for all the *.txt files and copy them to a TXT directory.
> I do NOT wish to copy the existing directory tree to the TXT directory. I have tried robocopy
> and Xcopy, but they both recreate the Directory tree.
>
> Any help would be appreciated.
>
> M
From the CMD prompt:
for /f "tokens=*" %a in ('dir /s /b *.txt') do @echo copy "%a" \TXT
In a batch file, use '%%a' instead of '%a'.
--
Phil Robyn
Univ. of California, Berkeley
u n z i p m y a d d r e s s t o s e n d e - m a i l
|