为什么不是del
工作,而是echo
意志?
echo
只会输出你告诉它的任何东西。
forfiles /p "C:\Users\hi\Desktop\test" /m *.jpg /d -1 /c "cmd /c del @path @srchmask"
上述命令不正确。没有@srchmask
为 to 命令定义的“命令变量” forfiles
:
Command Variables:
@file The name of the file.
@fname The file name without extension.
@ext Only the extension of the file.
@path Full path of the file.
@relpath Relative path of the file.
@isdir Returns "TRUE" if a file type is a directory,
and "FALSE" for files.
@fsize Size of the file in bytes.
@fdate Last modified date of the file.
@ftime Last modified time of the file.
源文件。
你已经/m *.jpg
为你的命令指定了一个“搜索掩码” forfiles
,所以我不确定你打算用@srchmask
. 你可以试试直接删掉...
您还应该阅读del的语法,以防您需要其他选项而不是@srchmask
...
延伸阅读