I want to extract a file in in windows, right after search for it, like this:
7z [args] | ls | grep filename
In my windows batch script, its:
7z [args] | dir /B | findstr filename
the search alone works perfectly like in linux, but i just cant pass it forward to a variable, or straight to 7z as an input.
I tried
- pipe from the left
- pipe from the right
for /f "delims=" %%a in ('dir /B ^| findstr onboard.zip') do @set Value=%%a
But all my solutions crashed with error.
My idea to pass the found file to any variable, OR give it straight forward to the extracting tool. Do you have any working solution/workaround for this? Thanks in advance!