![](/img/trans.png)
[英]How do I count all files in all sub folders in a directory and its sub folders but return the name of the sub folder with a count of the files?
[英]How do I run all batch files under directory and sub directory?
这是我的代码:
@echo off
for /R %%x in (*.bat) do (
call %%x
)
pause
我正在尝试在我的目录及其子目录下找到所有批处理文件。 当我回显结果时,它为我提供了文件的确切位置,但是当我尝试更改回显以调用以运行批处理文件时,出现错误,例如:
无法将“ C:\\ Users \\ Jairuz \\ Downloads \\ web”识别为内部或外部命令,可操作程序或批处理文件。
您尝试过弦乐吗?
@echo off
for /R %%x in (*.bat) do (
call "%%x"
)
pause
带空格的路径必须用(“)封装
资料来源: http : //ss64.com/nt/for_cmd.html
for /F "tokens=*" %%G in ('dir /b /s D:\*.bat') DO start "%%G"
祝好运!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.