Folders with generic "document" icon

Since upgrading to Catalina several folders in my Documents folder are displaying as the generic document icon (blank page with turned down corner) rather than the plain blue folder icon. What can I do to restore folder icon to these folders? Thank you.

iMac Line (2012 and Later)

Posted on Oct 7, 2019 2:09 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 15, 2019 4:24 AM

Well, it turns out that I dug deeper into my hard drive, and I in fact found some old folders from years ago which still do have the white generic document icon. So, I decided to put Kapitan Kloss's instructions to the test. Leave it to those "Germans" to figure out this kind of stuff. :) :)


For the sake of any inexperienced users who may be having a hard time understanding all of this, I am going to give you a simple, clear example in the Terminal app, which you will find in /Applications/Utilities.


Suppose that your user name on your machine is "Tom". On your hard drive, in your "Documents" folder, you have another folder called "My Work Reports", and within that folder you have a subfolder called "Languages". Now, inside of the "Languages" folder, you have discovered some folders which have the white generic document icon. So the first thing you need to do is to navigate to the "Languages" folder like this by using the "cd" -- or "change directory" -- command:


cd /users/tom/documents/my\ work\ reports/languages/


After typing that, you obviously have to hit your "return" key.


  1. Please notice that you don't need to specify uppercase or lowercase in the path. Lowercase will work just fine.
  2. Please also notice that if you have folder names with spaces in them, you need to escape them with a backslash.


After using the previous command, you will be in your "Languages" folder.


The next step is to list everything that is found in the "Languages" folder, so we use this command:


ls -l


Again, hit your "return" key after typing it. That command will produce something like this:


drwxr-xr-x 3 tom staff 96 Apr 25 06:20 Afrikaans

drwxr-xr-x@ 5 tom staff 160 Apr 25 06:23 English

drwxr-xr-x 3 tom staff 96 Apr 25 06:32 French

drwxr-xr-x@ 4 tom staff 128 Apr 25 06:30 German

drwxr-xr-x@ 6 tom staff 192 Apr 25 06:35 Korean

drwxr-xr-x@ 4 tom staff 128 Apr 25 06:23 Portuguese

drwxr-xr-x 3 tom staff 96 Apr 25 04:38 Slovak

drwxr-xr-x@ 6 tom staff 192 Apr 25 07:02 Spanish


As you can see, five of the folders are marked with the "@", which, as Kapitan Kloss explained, means that they "have the "extended attributes" (Finder metadata) included" with them.


So, let's say we want to find out what extended attributes that "English" folder has. Thus, in the Terminal again, we would type the following:


xattr english


Again, hit your "return" key after typing that.


The above command will produce the following result, and immediately return you to your command prompt, like this. Incidentally, "HD" represents the supposed name of our hard drive in this example. As you can see, we are still in the "Languages" folder:


com.apple.FinderInfo

com.apple.macl

HD:languages tom$


So, to remove the "com.apple.FinderInfo" attribute from the folder named "English" we would type the following, and hit the "return" key:


xattr -d com.apple.FinderInfo english


Now, you can do the same thing individually with the other four folderes, and hit the "return" key after each command like this:


xattr -d com.apple.FinderInfo german

xattr -d com.apple.FinderInfo korean

xattr -d com.apple.FinderInfo portuguese

xattr -d com.apple.FinderInfo spanish


As you do each one, you will immediately see each folder on your hard drive revert back to the normal blue folder.


Or, as Kapitan Kloss also explained, you can save time and use the wildcard symbol "*" to do all four of them at once like this:


xattr -d com.apple.FinderInfo*


Again, hit your "return" key after typing that command.


Please note that this will only affect folders in the "Languages" folder. To change folder icons in other folders, you obviously need to navigate there first using the "cd" command.


I hope these more extended instructions help some of you.


Thanks Kapitan Kloss for pointing us in the right direction. :)



Similar questions

90 replies

Oct 17, 2019 5:48 AM in response to BaileyW

I am having the exact same problem: so I looked into the file metadata using the mdls command and noticed the following:


All folders that appear normal have the following attributes, which I presume to be defaults:


kMDItemFSCreatorCode               = ""
kMDItemFSFinderFlags               = 0


Whereas all folders that appear as generic documents have different attributes:


kMDItemFSCreatorCode               = "/p"  # or "=" or "(null)"
kMDItemFSFinderFlags               = 992


So the question is: Is there a way to change all these attributes back to their default values in the terminal?



Oct 17, 2019 6:05 AM in response to Srg42

Folks, please take the time to read this entire thread. If you do, you will discover that until Apple officially fixes this Finder bug, there is a Terminal solution which works to restore the default blue folder icon. You will find it on page three of this thread. It will allow you to restore dozens, hundreds or even thousands of folder icons simultaneously. I can't guarantee that it will work for everyone, but some of us have had success using it. It concerns removing the "com.apple.FinderInfo" attribute.

Oct 17, 2019 6:29 AM in response to lunokhod

The xattr command does let you read and write these values, but only all at once, I guess. For example:


xattr -px com.apple.FinderInfo BadFolder
00 BE 00 61 01 7F 01 2A 03 A0 00 00 00 21 01 0E
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


where 2A and 03A0 correspond to


kMDItemFSCreatorCode = "*"
kMDItemFSFinderFlags = 928


One could modify those and then write the whole thing back with xattr -w. But then maybe waiting for Apple to fix this display bug is a more reasonable option for most people :-)

Oct 18, 2019 6:23 AM in response to Srg42

@Srg42 : The Terminal command


find . -type d -exec xattr -d com.apple.FinderInfo {} \; 2> /dev/null


will drill down to all nested folders, so you have to execute it only once if you start at your home or Documents folder. It 'cleans' only folders, doesn't touch files. It will take some time if you have thousands of them. For some more explanation see my post on page 4. I wouldn't use it on the Apps folder because applications are 'bundles': folders with a lot of 'hidden' content, including more folders. If you have there a real folder with problems just use

xattr -d com.apple.FinderInfo path&nameoffolder




Oct 18, 2019 6:50 AM in response to Srg42

@Sgr42: If you don't know how te set your startingpoint, the folder whose content you want to clean, do it with


cd path&nameoffolder

(path&name.. is easy to 'type' by drag en drop from Finder into Terminal)


And if you have a real folder in the Apps folder with problems I would use

xattr -d com.apple.FinderInfo path&nameoffolder

just for that folder


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Folders with generic "document" icon

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.