Board logo

标题: [文件操作] [已解决] 批处理怎样根据文件名称创建一个文件夹? [打印本页]

作者: a574045075    时间: 2019-11-16 20:43     标题: [已解决] 批处理怎样根据文件名称创建一个文件夹?

本帖最后由 a574045075 于 2019-11-17 10:07 编辑
  1. for %%g in (*.nds) do (call :subroutine "%%g")
  2. :subroutine
  3. set root_folder=%~n1
  4. md "%root_folder%\%title_id%\content"
复制代码
想用这个代码根据aaa & bbb.nds的文件名创建一个aaa & bbb文件夹,但是创建出来的是aaa文件夹,不是aaa & bbb文件夹,怎么办?
作者: Batcher    时间: 2019-11-16 22:14

回复 1# a574045075
  1. for %%g in (*.nds) do (
  2.     call :subroutine "%%g"
  3. )
  4. goto :eof
  5. :subroutine
  6. set "root_folder=%~n1"
  7. md "%root_folder%\%title_id%\content"
复制代码





欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2