なぜ意志ではなくdel
仕事をしないのecho
ですか?
echo
指示したものを出力するだけです。
forfiles /p "C:\Users\hi\Desktop\test" /m *.jpg /d -1 /c "cmd /c del @path @srchmask"
上記のコマンドは正しくありません。toコマンド@srchmask
用に定義された「コマンド変数」はありません。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.
ソースforfiles。
/m *.jpg
コマンドの「検索マスク」として既に指定しているためforfiles
、 で何をするつもりだったのかわかりません@srchmask
。あなたはそれを削除してみることができます...
...の代わりに他のオプションが必要な場合に備えて、 delの構文についても読む必要があります。@srchmask
参考文献