I need a simple batch script which parses this string and get the filename from it:
OTR-Tool, v1.1.0
&FN=Filename.avi
&FH=EAA7508AAAD86AA4D8FAAE404BAFFA8729AA9C80AA4C8CBA
&OH=7FA2FAB108329105401003EAE224721BAFFA962E98F72750
&Sw=FALSE
&SZ=1198525032
&H=426060A8B8829808B8EAB802B0926082
I tried this:
for /f "tokens=1,2 delims==" %%A in ('%~dp0otrtool\otrtool.exe %1') do if "%%A"=="&FN" set FN=%%B
But this doesn't work. I just get the entire output. Quick help somebody?
upd I tried also to execute just the following
otrtool.exe filename.key | find "&FN"
but I get the entire ouput again.
FN?otrtool.exe > test.txtshould output the usage information of this program into the file. Though the file is created, its size is 0 bytes and the output of the executable goes to the console.otrtool.exe > test.txt 2>&1