Multi Commander > Support and Feedback
How to set packer filter properly to keep empty folders?
Jungle:
E.g. i have the following file/dir structure:
--- Code: ---\txt
1.txt
2.txt
1.dat
2.dat
3.txt
--- End code ---
If i set pack filter to "-*.txt" then archive will not have txt folder. But i want that folder to be in the archive even it's empty. What is the proper filter?
Mathias (Author):
Normally folder are not added to a zip. since they are not needed.. Zip store files with full path so having lone folder items is of no use.
So to save space I think it gets stripped away.
Jungle:
But if I just pack empty folder without filter, it is added to archive.
AlanJB:
Actually Zip does allow empty folders by default (at least in a Windows environment).
I have been using WinZip since v6 and that has always been the case.
So do 7zip, zip, Peazip, RAR, LZ, etc...
Alan
Mathias (Author):
--- Quote from: AlanJB on July 17, 2016, 00:05:46 ---Actually Zip does allow empty folders by default (at least in a Windows environment).
I have been using WinZip since v6 and that has always been the case.
So do 7zip, zip, Peazip, RAR, LZ, etc...
Alan
--- End quote ---
It is allowed and possible. Just that zip does not NEED it to work. And most of them do not include them. unless the folder are empty.
every item in a zip is stored with its full "in the zip" path. (not like the filesystem that stores its files is a tree structure ) so you do not need the folder item to place a file inside that..
so many zip libraries do not include them because the spec recommend to not include them since they are only taking up space. Because they want to create archives that are as small as possible. if you zip a folder structure with 1000x folders and files, all the folders are taking up entries in the archive, and the archive become larger then it has to be.
That is the reason why it is not added. because normally it should not add folder.. except if it is empty
However. Normally MC would include folders entry if it is empty. But the problem here is that when using filters the are some conflicts that make it not add it.
Navigation
[0] Message Index
[#] Next page
Go to full version