Zipped File from Save() Appearing in Wrong Directory

Oct 22, 2008 at 11:15 PM
Super Library, I've used it numerous times about 6 months ago. Brain-dead question:  in running the code below, the zipped file is appearing under the folder my exe resides in and not under C:\Test.  I have utilities that I used the 1.3 version in from about 6 months ago that run with the zipped output saved to the location in AddFile or AddItem, (as expected) but in any new code I create, the output goes to the location the exe resides under.  Checked all obvious stuff in the project and reference settings and made sure the old code was the same as the new:

ZipFile zip = new ZipFile("Archive.zip");
zip.AddFile("C:\Test\test.txt");
zip.Save();


Any assistance is appreciated.

John

Coordinator
Oct 24, 2008 at 12:54 AM

I am not clear on the problem you are describing.

The behavior of the library changed since then, particularly around figuring the directory name for entries added to archives.

Using the code you have above, you should get a zip archive called 'Archive.zip' in the current working directory.   In that zip file, you will have one entry, named Test/test.txt. 

Is that not what you want?
What DO you want?

 

Oct 24, 2008 at 10:48 PM
Thanks for getting back. I thought the zip file would be under c:\test, the folder as stated in the AddFile method in this example, but you are right, it is under the working directory of the application. Which, when one thinks about it, might be the best place to put it. I'll check the Chm regarding if one can specify the output folder.

Thanks,

John



On Thu, Oct 23, 2008 at 7:54 PM, Cheeso <notifications@codeplex.com> wrote:

From: Cheeso

I am not clear on the problem you are describing.

The behavior of the library changed since then, particularly around figuring the directory name for entries added to archives.

Using the code you have above, you should get a zip archive called 'Archive.zip' in the current working directory. In that zip file, you will have one entry, named Test/test.txt.

Is that not what you want?
What DO you want?

Read the full discussion online.

To add a post to this discussion, reply to this email (DotNetZip@discussions.codeplex.com)

To start a new discussion for this project, email DotNetZip@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com