DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Recursive File Operations: Compress Files With Gzip
This will recursively traverse the entire directory tree from the current directory down and compress every file.
for /r %V IN (*) DO gzip -9v "%V"
this will recursively traverse the entire directory tree from the current directory down and uncompress every file.
for /r %V IN (*.gz) DO gzip -dv "%V"
make sure you have gzip in your path.





