# Create zip file without hidden directories

**URL:** <https://www.finalbuilder.com/forums/t/create-zip-file-without-hidden-directories/366>\
**Category:** Discussion\
**Created:** [February 21, 2007, 12:15pm UTC](https://www.finalbuilder.com/forums/t/create-zip-file-without-hidden-directories/366 "2007-02-21T12:15:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [February 21, 2007, 12:15pm UTC](https://www.finalbuilder.com/forums/t/create-zip-file-without-hidden-directories/366/1 "2007-02-21T12:15:51Z")

</div>

I’m using the ‘Create Zip File’ action to archive selected files and directories from a section of a Subversion working copy.&nbsp; The problem I’m having is that zip is grabbing files from the hidden .svn directories.&nbsp; I cannot find an option to ignore hidden or system files/directories in the action.  
  
Is the only option here to do an SVN Export to a temp folder, zip the temp folder and then delete it?

---

<div class="post-metadata">

**Author:** ![stevage](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@stevage](https://www.finalbuilder.com/forums/u/stevage)\
**Post date:** [February 21, 2007, 1:21am UTC](https://www.finalbuilder.com/forums/t/create-zip-file-without-hidden-directories/366/2 "2007-02-21T01:21:35Z")

</div>

There are probably lots of workarounds. Some off the top of my head:  
- Don’t use recurse, use a folder iterator to iterate over (non-hidden) folders and progressively build up the zip file  
- Set the ‘archive’ bit on the non .svn directories and use ‘skip if archive bit not set’  
- Use the ‘remove files’ to explicitly remove the ‘.svn’ directories - probably the cleanest solution  
  
Steve

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [February 22, 2007, 11:25am UTC](https://www.finalbuilder.com/forums/t/create-zip-file-without-hidden-directories/366/3 "2007-02-22T11:25:31Z")

</div>

1. Would using a folder iterator add relative paths to the zip file?  
2. Changing bits on the .svn directories is not an option.&nbsp; The SVN client maintains those directories.&nbsp; If we delete the working copy and re-checkout then the bits we set/reset will be gone.  
3. Adding .svn to the Exclude Files page does not work.&nbsp; It excludes files, not directories.  
  
My current work-around is to use the SVN Export action to export the directory to %TEMP%, zip it from there, and then delete the exported directory.&nbsp; Not pretty, but it works.

---

<div class="post-metadata">

**Author:** ![stevage](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@stevage](https://www.finalbuilder.com/forums/u/stevage)\
**Post date:** [February 23, 2007, 1:04am UTC](https://www.finalbuilder.com/forums/t/create-zip-file-without-hidden-directories/366/4 "2007-02-23T01:04:17Z")

</div>

1. Not sure, you’d have to try it. Probably depends how you set it up.  
2. I mean, explicitly set the bits just before the compression step.  
3. I mean using the “Remove files” check box on the main screen, not the “Exclude files” tab.  
  
Steve
