forfiles /M *tar.gz /C "cmd /c "%ProgramFiles%\7-Zip\7z" e @path"
Windows command prompt: escape special characters within quotation marks
-
17-01-2022 - |
문제
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
해결책
다른 팁
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"
제휴하지 않습니다 StackOverflow