Save File Without Directory Structure

Nov 13, 2008 at 6:38 PM
In my ASP.NET Web App I am trying to save a .txt into a zip so I can ftp it over to google base. The problem I am having is the entire directory structure is being added to the zip file not just the .txt document.

Example of what I am getting:

I need it to be:

The zip saves in the correct location, I just need get rid of the directory structure. Any Ideas?

(ZipFile zip = new ZipFile(@"C:\Inetpub\wwwroot\googlefeed\"))




Nov 13, 2008 at 8:09 PM
Found solution in docs!

zip.AddFile(@"c:Inetpub\wwwroot\googlefeed\file.txt", "");