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

Snippets has posted 5883 posts at DZone. View Full User Profile

Recursive File Operations: Compress Files With Gzip

04.07.2005
| 11728 views |
  • submit to reddit
        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.