Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo on
- set Location=C:test
- Set Destination=D:DevelopmentTestIn
- Set FileName=DailyVB.*
- Set SearchResult=SearchResult.txt
- Where /R "%Location%" "%FileName%" > %SearchResult%
- For /f "delims=*" %%a in (%SearchResult%) Do (If Not Exist "%Destination%%%~na" MD "%Destination%%%~na")
- For /f "delims=*" %%b in (%SearchResult%) Do (echo Copy "%%b" "%Destination%%%~nb" & Copy /-Y "%%b" "%Destination%%%~nb")
- pause
- Explorer "%Destination%"
Add Comment
Please, Sign In to add comment