Sign in to follow this  

[.net] Troubles With ZipFile Class And System.IO.Compression

Recommended Posts

I'm using the classes found at but I'm having troubles with the resulting zip file. When I add a file, for some reason the zip file records every directory from root on up and puts those into the zip. As an example, let's assume I zip up the file "C:/something/somethingelse/1/2/3/picture.png". The resulting zip file will look like this: "something/somethingelse/1/2/3/picture.png". Any idea why it automatically puts all those folders in there? I just want picture.png inside the zip, not the whole directory hierarchy. Any suggestions are welcome.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this