Tuesday, November 9, 2010

PowerShell | Filter svn files while zipping

Use the -xr!?svn\* switch to filter svn files out of zip packages

"C:\Program Files\7-Zip\7z.exe" a -r -tzip -y -xr!?svn\* Project.zip C:\Project\To\Backup\*

or (worked for me)

"C:\Program Files\7-Zip\7z.exe" a -r -tzip -y -xr!?svn Project.zip C:\Project\To\Backup\*

http://superuser.com/questions/28162/how-do-i-use-7-zip-to-backup-files-but-exclude-some-directories

No comments:

Post a Comment