Batch file 批处理命令将png文件移动到文件夹同名文件和文件夹
我想使用批处理dos将png文件移动到同名文件和文件夹中Batch file 批处理命令将png文件移动到文件夹同名文件和文件夹,batch-file,Batch File,我想使用批处理dos将png文件移动到同名文件和文件夹中 Example:- abc <= folder adc.png => abc\abc.png abc1 <= folder adc1.png => abc1\abc1.png a b c <= folder a d c.png => a b c\a b c.png A b c D <= folder A b c D.png
Example:-
abc <= folder
adc.png => abc\abc.png
abc1 <= folder
adc1.png => abc1\abc1.png
a b c <= folder
a d c.png => a b c\a b c.png
A b c D <= folder
A b c D.png => A b c D\A b c D.png
etc.
示例:-
abc\abc.png
abc1 abc1\abc1.png
a b c a b c\a b c.png
A b c D A b c D\A b c D.png
等
类似这样的内容…注意,只有在键入cmd时,此选项才起作用。您需要加倍
%
未找到签名文件:(请以更容易理解的方式格式化目录树。
for /F "Tokens=* delims=" %%I in ('dir /a-d /b *.png') do (
mkdir "%%~nI"
move "%%~I" "%%~nI/%%~I"
)