Eu estava fazendo a mesma pergunta nos fóruns oficiais do 7-Zip e consegui a resposta de Igor Pavlov. Eu gostaria de obter a resposta de Igor no site, mas ele parece não ter uma conta aqui. Ele sugere apenas remover a opção -r
, pois 7z
usa a pesquisa recursiva por padrão:
Your command searches empty file or folder in all subfolders.
Remove-r
switch.
Aqui está o respectivo trecho do FAQ oficial:
Why doesn't -r switch work as expected?
In most cases you don't need -r switch. 7-Zip can compress subfolders even without -r switch.
Example 1:
7z.exe a c:\a.7z "C:\Program Files"
compresses "C:\Program Files" completely, including all subfolders.Example 2:
7z.exe a -r c:\a.7z "C:\Program Files"
searches and compresses "Program Files" in all subfolders of C:\ (for example, in "C:\WINDOWS").If you need to compress only files with some extension, you can use -r switch:
7z a -r c:\a.zip c:\dir\*.txt
compresses all *.txt files from folder c:\dir\ and all it's subfolders.