This project is read-only.

deletion of directory in 1st level

Sep 11, 2009 at 11:25 PM


assume that the zip file has several first level directories, like: "toto/"

If I use removeselectedentries, I cannot delete the directory "toto/" like e.g. zip.removeselectedentries ("name = *","toto/")

Is this a bug or how should I do it?


Sep 11, 2009 at 11:30 PM

Can you clarify for me what you want to accomplish?

Do you want to remove the entry with the path "toto/" ?

do you want to remove all entries with the path "toto/*.*" ?



Sep 12, 2009 at 12:05 AM
Edited Sep 12, 2009 at 12:24 AM

the directory toto/ is already empty, that means there is no other entry with a path containing "toto/". So I like to remove the entry "toto/" (Isdirectory = TRUE).
I was able to use zip.removeselectedentries ("name = *","toto/48/") in order to delete the subdirectory 48/ of directoy "toto/". I thougth the same should work now with "toto/" but it doesn't.

I also tried zip.removeselectedentries ("name = toto/") but this does not work.

Sep 12, 2009 at 12:48 AM


I have found my error:
directories in ZIP file don't end with "/". So I have to use "toto" instead of "toto/". Now it works.