UK Application Development Consulting - PowerShell script to clean and zip a directory
“As part of my role I’m often sending sample code to customers. Sometimes this is a small snippet inline in an email, but often it will be a zipped up Visual Studio solution. Simply zipping up the folder as-is ends up including bin and obj directories which bloat the zip. Performing a clean in Visual Studio helps, but I ended up writing a PowerShell script to perform the directory clean. It turned out to be reasonably simply to put together:
…
I thought using Shell.Application to execute the zip an interesting approach and one I wanted to capture for future reference. That and the script itself, as I still find myself in the “Zip My Solution” game at times… ;)
Related Past Post XRef:
SolutionZipper - VS2005 Addin to Clean and Zip in One Step
MSBuild your way to ZIP Deliveries – Using MSBuild and MSBuild Community Tasks to zip your Build
No comments:
Post a Comment
NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...
ALL comments are moderated. I will review every comment before it will appear on the blog.
Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...
I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...
Please see my comment policy for more information if you are interested.
Thanks,
Greg
PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...