将通配符文件夹结构文件移动到目标文件夹 [英] Move Wildcard Folder structure files to a destination folder

查看:152
本文介绍了将通配符文件夹结构文件移动到目标文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将所有开始工作的文件夹Temp_ * 移动到不同的文件夹...我不是我们是否可以使用通配符文件夹...我在网上有些人发布了这段代码,不知道如何应用到我的场景。非常感谢。

I want to move all the folders with the starting work "Temp_*" to a different folder...I am not whether we can use wild card with Folders...I was looking online some one posted this piece of code not sure how to apply to my scenario..Any kind of help is really appreciated

感谢BB

@echo off for /d %%a in ({*}) do xcopy "%%a" "C:\Home\a\b\tmp\%%a\" /E


推荐答案

这里有一种方法,用您的源文件夹位置替换C:\TEST01 \:

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

这篇关于将通配符文件夹结构文件移动到目标文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆