I am trying to use WinRAR command line to zip folder:
"c:\Program Files\WinRAR\WinRAR.exe" a -afzip "e:\output.zip" "e:\foldertozip\"
If the foldertozip
contains file, the command line works. But if the folder contain no file but folders where sub folder will contain files, it will appear the error saying No files to add
.
How can I solve it?
Best Answer
If the folder contains no files apart from subfolder containing files there is an error
Use the
-r
recurse subfolders switch.Examples to compress a folder
Source Using the WinRAR Command-line tools in Windows