- Products -


Software


NEWS


Special



- Knowledge -


Category × Tag



- Like -

公開
作成日:2021/10/19
更新日:2022/3/4

【CMD】実行したファイルのフォルダパスを取得する方法

・起動時に自動で設定される変数に、実行ファイルのパスが格納されている。それを参照する。

使い方



set current_dir=%~dp0
echo %current_dir%
pause


参考


https://www.projectgroup.info/tips/Windows/cmd_0006.html


Category



Tag




関連記事


{{tmp.name}}

{{article.category}} {{article.title}}