I am trying to write a batch script that will run automatically compressing subdirectories using winrar or 7-zip:
Example:
My Pictures
Pics1 (Pics1.
Another approach if you need to recursively zip files in all subdirs in windows is to use gitbash and the approach described here:
find * -type d ! -empty -execdir sh -c 'cd "$1" && 7z a "$1".7z -x!*/ && cd -' sh {} \;
This will:
You can also exclude specific types with:
find * -type d -execdir sh -c 'cd "$1" && 7z a "$1".7z -x!*/ -x!*.7z -x!*.zip && cd -' sh {} \;