I want to move all the folders starting with "Temp_*****" to a different folder. It does not seem like we c开发者_JAVA技巧an use wild card with Folders. I was looking online, and someone posted this piece of code but I'm not sure how to apply it to my scenario.
@echo off for /d %%a in ({*}) do xcopy "%%a" "C:\Home\a\b\tmp\%%a\" /E
Here's one way to do it, replace C:\TEST01\ with your source folder location:
for /F %%a in ('dir C:\TEST01\TEMP_* /ad /b') do move C:\TEST01\%%a C:\Home\a\b\tmp\%%a
精彩评论