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.
ディレクトリパスを出力するWindowsバッチファイルがあります。例:
@echo c:\windows
この文字列「c:\windows」をPUSHDコマンドに渡したいと思います。私はこれを試しました:
path.bat | PUSHD
ただし、「プロセスが存在しないパイプに書き込もうとしました」というエラーが発生します。
助けてください。
解決されたコマンドプロンプトログは次のようになります。
c:\>path.bat | PUSHD c:\Windows>
基本的な考え方(適切な調整を行う必要があります):
for /f %i in ('path.bat') do pushd %i