Yes, Archive can preserve directory structure when creating or extracting ZIP or CAB (Microsoft Cabinet) archive types, using the PreservePath property (together with proper use of the AddFile method and ArchiveType property). Directory structure will be preserved for all the subfolders and files of any directories which are added to the archive, but not for loose files which are added individually.
Note: Prior to dll version 1.0.7.6, this functionality was fully supported for CAB files, but only partially supported for ZIP files. Archive was able to preserve directory structure when extracting either type of archives, but was only able to preserve directory structure when creating CAB files. To preserve directory structure when creating ZIP files, make sure you have dll version 1.0.7.6 or above. |