Don't Include Parent Path

Apr 10, 2013 at 8:22 PM
I'm sorry if this question has been asked many times before. I'm new to this forum.

Let's say I have a zip file with another file in it, with a path of C:/Users/Admin/Something.txt.
If I were to save the zip file, and then read it, I would have to browse Users, Admin, and then I would find Something.txt.

Any ways to have the file without browsing anything?
Apr 10, 2013 at 11:28 PM
If you mean adding files without it's full path?

zip.AddFile(@"C:/Users/Admin/Something.txt", String.Empty);

That will put it in the root of your zip file.