移动其他的文件不是* .BAT所有其他的不同的文件夹需要的批处理命令 [英] Needed Batch command for moving file other than *.bat all others to the different folder
本文介绍了移动其他的文件不是* .BAT所有其他的不同的文件夹需要的批处理命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
移动其他的文件不是* .BAT所有其他的不同的文件夹所需Windows批处理命令。
解决方案
pushd将C:\\ folder_with_bat_files
FOR / F令牌= * delims =%%一个在('DIR / B / A:-d ^ | FINDSTR / I / E / V蝙蝠')做(
移动/ Y%%〜FAC:\\ some_dir
)
使用 FINDSTR
命令过滤的redults DIR
命令。
Needed windows Batch command for moving file other than *.bat all others to the different folder.
解决方案
pushd "c:\folder_with_bat_files"
for /f "tokens=* delims=" %%a in ('dir /b /a:-d^| findstr /i /e /v "bat"') do (
move /y "%%~fa" "c:\some_dir"
)
use findstr
command to filter the redults of dir
command.
这篇关于移动其他的文件不是* .BAT所有其他的不同的文件夹需要的批处理命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文