命令行:用空格子文件夹创建文件夹 [英] Command line: Create folders in subfolders with spaces

查看:151
本文介绍了命令行:用空格子文件夹创建文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关一个项目,我收到700文件夹与各院校(含空格)的名称。
现在的目标是在每个文件夹中创建子文件夹。

[机构文件夹] \\文档\\
[机构文件夹] \\图片\\
[机构文件夹] \\视频\\

在这里。根据一些帖子下面的脚本应该努力创造Documents文件夹

  FOR / D%A IN(C:\\用户\\ MYNAME \\项目\\机构\\ *)DO的mkdir%A \\文件

不过,我注意到,我从该指令在该文件夹名的空间无法在命令行中得到的反馈。我怎样才能得到这个工作?


解决方案

  FOR / D%A IN(C:\\用户\\ MYNAME \\项目\\机构\\ *)DO的mkdir% A\\文件

应该做的伎俩。

For a project I received 700 folders with names of institutions (containing spaces). The purpose is now to create subfolders in each of these folders.

[institution folder]\Documents\ [institution folder]\Images\ [institution folder]\Videos\

According some posts here the below script should work to create the Documents folder

FOR /d %A IN (C:\Users\myname\project\institutions\*) DO mkdir %A\Documents

However, I notice in the feedback that I get from the command line that this instruction fails at the spaces in the foldername. How can I get this to work?

解决方案

FOR /d %A IN (C:\Users\myname\project\institutions\*) DO mkdir "%A"\Documents

should do the trick.

这篇关于命令行:用空格子文件夹创建文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆