简体   繁体   English

将通配符文件夹结构文件移动到目标文件夹

[英]Move Wildcard Folder structure files to a destination folder

I want to move all the folders starting with "Temp_*****" to a different folder. 我想将所有以“ Temp _ *****”开头的文件夹移动到另一个文件夹。 It does not seem like we can 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

这是一种方法,将C:\\ TEST01 \\替换为您的源文件夹位置:

for /F %%a in ('dir C:\TEST01\TEMP_* /ad /b') do move C:\TEST01\%%a C:\Home\a\b\tmp\%%a

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 查找所有文件并复制到另一个保留文件夹结构的目标位置 - Find all files and copy to another destination keeping the folder structure 如何使用Windows命令将文件夹结构和文件复制到目标位置? - How to copy the folder structure and files into the destination using a Windows command? 在Windows中移动文件夹覆盖目标文件夹 - move folder in windows overwriting the destination folder 将文本文件中具有字符串结构的多个子文件夹中与字符串匹配的文件复制到另一个目标文件夹 - Copy files matching string(s) in a text file out of many subfolders with folder structure to another destination folder 搜索埋在文件夹中的文件夹,然后将其移动到新目的地 - search for a folder buried in a folder and move the folder to a new destination 批处理脚本可将文件从scource移到目标文件夹,以保存30天以上的文件 - Batch script to move file from scource to destination folder for files older than 30 day 将文件移动到CMD中的父文件夹 - Move files to parent folder in CMD Windows move命令未使用bat将匹配文件移动到目标文件夹 - Windows move command not moving the matching file to destination folder using bat 根据部分文件名批量创建文件夹并将文件移动到文件夹 - Batch create folder based on partial file name and move files to folder 批处理文件可将一个文件夹中的文件和文件夹移动到另一个文件夹 - Batch file to move files and folders in a folder to another folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM