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.
現在のパス (%~dp0) を取得し、バックスラッシュをスラッシュに変換して、さらにコマンドに渡すスクリプトを作成する必要があります。
環境のため、私が持っている唯一のオプションはWindowsシェルです(問題が問題にならないPowershellではありません)。
それは可能ですか?
setコマンドには置換機能があります。
set
set a=C:\test\dir set a=%a:\=/% echo %a%
結果:
C:/test/dir