Find specific files from a directory and copy to a newfolder
Posted: 08 Feb 2010 13:21
I want to find specific files (*quiz*.htm or *.log) from all subdirectories and copy them to a folder, all files should have sepearter name (1.htm,2.htm,3.htm,4.htm.....)
how can i do this?
i used this first
c:\>xcopy *quiz*.htm d:\myfolder /e
but it copies all empty folders then i am trying this but it is still very difficult
for /r c:\ %%s in (*.log) do (for /L %%t in (1 1 1000) do xcopy "%%~dps%%~nxs" D:\quizes\%%t.log)
there could be many files with same name thats why i want to copy them with different names
Need help
how can i do this?
i used this first
c:\>xcopy *quiz*.htm d:\myfolder /e
but it copies all empty folders then i am trying this but it is still very difficult
for /r c:\ %%s in (*.log) do (for /L %%t in (1 1 1000) do xcopy "%%~dps%%~nxs" D:\quizes\%%t.log)
there could be many files with same name thats why i want to copy them with different names
Need help