开发者

Move Wildcard Folder structure files to a destination folder

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜