I am trying this command:
for /f "tokens=3 usebackq" %%i in (`"%~dp0imagex.exe" /info "%~dp0DVD\sources\install.wim" ^| findstr /c:"Image Count:"`) do set ImageCount=%%i
echo %ImageCount%
I get error if the path %~dp0 contains spaces like "D:\my work". Although I used usebackq and back quote instead of single quote.
the error message is:'D:\my' is not recognized as internal or external command, operable program or batch file.
What is the wrong in my command?
echo oninstead ofoffto see if you can spot any errors.