Reputation: 87
I have a simple BAT sdcript that should run the WTVCnverter. I want it to match all files by *.wtv and using the program convert to dvr-ms. Before executing the second or third file it should wait for the WTVConverter to exit before proceeding.
@echo off
for %%f in (*.in) do (
echo %%~nf
C:\Windows\ehome\WTVConverter.exe "%%~nf.wtv""%%~nf.dvr-ms" /ShowUI | out-null
)
Upvotes: 0
Views: 69
Reputation:
In a batch file (though your code works as is if typed) preface the command with cmd /c start "" /w
so
cmd /c start "" /w C:\Windows\ehome\WTVConverter.exe "%%~nf.wtv""%%~nf.dvr-ms" /ShowUI | out-null
GUI processes (ie not console) are waited on in batch but not when typed. See start /?
.
Pipes are also implemented by cmd.exe. If your pipe character is for your program escape with a ^
.
You seem to be lacking a space between in and out filename.
Upvotes: 1