Reputation: 496
I have a windows batch file, which outputs directory path, e.g.:
@echo c:\windows
I would like to pass this string "c:\windows" into PUSHD command. I tried this:
path.bat | PUSHD
but it errors out with "The process tried to write to a nonexistent pipe.".
Please help.
The solved command prompt log would look something like:
c:\>path.bat | PUSHD
c:\Windows>
Upvotes: 2
Views: 1119
Reputation: 45173
Basic idea (you will need to make appropriate adjustments):
for /f %i in ('path.bat') do pushd %i
Upvotes: 3