2
我做了一个批处理脚本,它应该回显所有带有.txt
扩展名的文件的完整路径。为什么我的脚本找不到这些文件?
forfiles /m *.txt /c "echo @PATH"
当我运行它,我得到这个错误:
ERROR: The system cannot find the file specified.
是什么原因呢?
我做了一个批处理脚本,它应该回显所有带有.txt
扩展名的文件的完整路径。为什么我的脚本找不到这些文件?
forfiles /m *.txt /c "echo @PATH"
当我运行它,我得到这个错误:
ERROR: The system cannot find the file specified.
是什么原因呢?
试试这个:
forfiles /m *.txt /c "cmd /c echo @PATH"
的问题是,echo
是不是程序本身,但它是一个内置cmd
程序的命令。所以你必须执行cmd
才能使用echo
。
难道只是该目录中没有'.txt'文件吗? – ooga
有7 @ @加 –