문제

I´d like to untar a tar.gz file with 7-Zip using this command:

forfiles /M *tar.gz /C "cmd /c "C:\Program Files\7-Zip\7z" e @path"

but I can´t make it work because of the whitespace within Program Files. How can I escape it?

Update:

My alternative solution is:

set 7ZPath="C:\Program Files\7-Zip\7z"
%7ZPath% e *.tar.gz
도움이 되었습니까?

해결책

forfiles /M *tar.gz /C "cmd /c "%ProgramFiles%\7-Zip\7z" e @path"

다른 팁

Quotes within your FORFILES command string must be escaped as \"

forfiles /M *tar.gz /C "cmd /c \"C:\Program Files\7-Zip\7z\" e @path"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top