Visual Studio Templates has folder structure like this:
/ProjectTemplatesCache
/CSharp
/Windows
/1033
/ClassLibrary.zip -- the lowest subfolder
/Properties
/WindowsService.zip -- the lowest subfolder
/1042
/VisualBasic
I want to start at the root folder, dig down to the lowest subfolders and zip each of them to a separate archive.
Using Windows Batch or C#.
How to zip – doesn’t matter. Just be able to select each separately / execute a command against each.
Any ideas?
C# 4.0:
Look at ICSharpZip to do the actual zipping
Update:
Ok, just mixing the condition with the
Where()you can always provide a
Func<DirectoryInfo, bool>to decide which directories are toBeZipped