Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
変数の引用符を ecraning するようなことはできますか? 例えば、
if "%1"=="/?" goto :help
引数が "
試してみてください"%~1"。チルダ修飾子は%1、存在する場合、から引用符を取り除きます。
"%~1"
%1
残念ながら、バッチ ファイルで特殊文字 (引用符、括弧、キャレット) を含む文字列を処理する一般的な安全な方法はありません。何を書いても爆発するケースは必ずあります。