2
0
How can I configure WinRAR to exclude files with the exact filenames: thumbs.db
or .DS_Store
(ignoring case) from being extracted from an archive (all directory levels within an archive)?
Files with these filenames should not be extracted:
Thumbs.db
thumbs.db
THUMBS.DB
.DS_Store
.ds_store
.DS_STORE
Files with these names should be extracted:
1Thumbs.db
1thumbs.db
tackthumbs.db
Thumbs.db.txt
Abcd thumbs.db.txt
1.DS_Store
Abcd.ds_store
.DS_Store.txt
Abcd.DS_STORE.txt
Also, does anyone know if WinRAR has a syntax guide for the prohibited file types list in case I'd like to add more filenames or be flexible with the rules I need?
Essentially I'd like to avoid extracting unnecessary files from ZIP, RAR or 7z archives in Windows 7 - files like Windows 2000/XP's Thumbs.db file (Thumbnail cache) and Mac OS X' .DS_Store file (Desktop Services Store), while not being too strict and also not extracting files which just contain 'Thumbs.db' or '.DS_Store' in its filename.
Edit:
I've entered thumbs.db .DS_Store
in the WinRAR prohibited file list. I have encountered a ZIP file that has a .DS_Store file in a 2nd level directory. (Zipfile.zip > Parent Directory > Directory where .DS_Store is stored)
. When I extract this ZIP file, WinRAR still extracts the .DS_Store file. Changing .DS_Store
to *.DS_Store
in the prohibited files list fixes this. The same issue happens with thumbs.db files.
My prohibited files list is now *thumbs.db *.DS_Store
, while this could exclude *thumbs.db
and *.DS_Store
in all directories, my concern is that this could also affect filenames that I do not intend to exclude (e.g. SampleThumbs.db
or Sample.DS_Store
).
Anyone know why the previous entry didn't work in non-root directories in this case? Also, is there a better entry in the Prohibited files list that will work to exclude only thumbs.db and .DS_Store files for all directory levels in a ZIP/RAR/7z file?
I've entered
thumbs.db .DS_Store
in the prohibited file list. I have encountered a ZIP file that has a .DS_Store file in a 2nd level directory. (Zipfile.zip > Parent Directory > Directory where .DS_Store is stored
). When I extract this ZIP file, WinRAR still extracts the .DS_Store file. Changing.DS_Store
to*.DS_Store
fixes this. My prohibited files list is nowthumbs.db *.DS_Store
. Anyone know why the previous entry didn't work in this case? – galacticninja – 2011-05-20T09:44:10.693I got this email from WinRAR support answering my question in the above comment: "If file mask does not contain wildcard characters and does not contain path, it is valid only for root archive folder." – galacticninja – 2011-08-18T05:24:41.347