Setting WinRAR to exclude specified files from being extracted in Win7

I would like to ask how to set WinRAR to exclude files with the exact filenames: 'thumbs.db' or '.DS_Store' (without the quotes, ignore case) from being extracted from an archive.

Ex. Files with these filenames should not be extracted:


while files with these filenames should be extracted:

Abcd thumbs.db.txt

In 'Settings->Security->Prohibited file types->File types to exclude from extracting', if I just type in 'thumbs.db .DS_Store' (without the quotes) in the field, will it work the way I described?

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?

The reason for this question, is I'd like to not extract 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.
2 answers Last reply
More about setting winrar exclude files extracted win7
  1. Entering only 'thumbs.db .DS_Store' (without quotes) in the WinRAR prohibited file list, only excludes thumbs.db and .DS_Store in the root directory and not in a 2nd level or deeper directory. I have encountered a ZIP file that has a .DS_Store file in a 2nd level directory. ( > 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' (without quotes). 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).

    Is there an 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, or at least a better one than 'thumbs.db .DS_Store' (without quotes)?
  2. If you run WinRAR using a command line you can specify an "exclude file" using the "-X" option. That lets you specify a text file in which you identify files to be excluded using wildcards - WinRAR compares the entire full path of the filename to the wildcarded names in the file so the exclusions work for files at any level of the directory.

    Full details of the command line options are available in the WinRAR help file.
Ask a new question

Read More

Windows 7