I use following command to copy files to folders with same name.
for /f %x in ('dir /ad /b') do move %x*.* %x\
I use move %x*.* %x\\
to move the files to given directory. It doesn't work for files, which has spaces in their filenames, but not sure what to change.
此命令使用“ DELIMS =“来防止拆分。
for /f "DELIMS=" %x in ('dir /ad /b') do move "%x*.*" "%x\"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.