Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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 Best reply

Posted on Oct 20, 2019 8:39 AM

I had another look at my above published Terminal command and made it more bullet-proof.

- it touches only real folders, not files;

- it drills recursively down into subfolders, subsubfolders etc;

- applications are, for Terminal, also folders, but they are skipped (new);

- Library folder is skipped (new);

- folders without the FinderInfo generate an error that we don't want to see;

- but real errors (there shouldn't be) are displayed (new).


find $PWD -type d -not \( -path "*.app" -prune \) -not \( -path "$HOME/Library" -prune \) -exec xattr -d com.apple.FinderInfo {} \; 2>&1 | grep -v -e 'No such xattr'


(copy the complete italic line(s) above, paste in Terminal and hit return)

Don't use the command with your root-folder, your startup disk, as starting point. System and Library and a lot of invisible Unix folders are there that you don't want to process.

OK are:

- your home folder, where Terminal is when you launch it

- one up, the Users folder: cd /Users

- all other folders, except System and Library: cd drag&drop_a_folder_into_Terminal

- external disks with just data and applications (but not a complete CCC backup, with System etc)


In Terminal file- or folder-names with funny characters ($/`| etc) can cause problems, but find is quite safe in this regard. And be patient, the execution can take quite some time.

(my problem with other shorter solutions here is that they also process files and applications)

Similar questions

90 replies

Oct 14, 2019 5:47 PM in response to WordWeaver777

I've been trying to figure out why all of my folders are suddenly blue again when viewed from in Catalina, even on my other machine. I was trying to think what I may have done which resulted in this positive development.


One possibility is that sometime over the past few days, I may have relaunched the Finder. Whether or not that has any thing to do with the blue folders reappearing, I honestly do not know.


For those of you who may not know how to do this, simply hold down your Option key, right-click on the Finder icon in your Dock, and choose the "Relaunch" option. As I said, it may do nothing at all to fix the generic icon problem, but is worth a try, and it won't do any harm to your computer.


The second thing I thought of was that over the past few days, I have made invisible files visible, and vice versa. You can do it in the Terminal, but I have this neat, little, free app called Desktop Utility which does that, and more. You can download it here:


https://www.macupdate.com/app/mac/38299/desktoputility


Again, I don't know if making invisible files visible, and then reversing it fixed the white generic document icon problem or not. But again, it couldn't hurt to try.


If either of these two options work for anyone here, please let me know. Thanks. I am as curious about this as you are.

Oct 14, 2019 11:55 PM in response to BaileyW

I also got many folders with generic white icons after upgrading to Catalina. I noticed that affected folders have the "extended attributes" (Finder metadata) included, as evidenced by "@" in the long listing for the second folder (my commands in italics):


ls -l

drwxr-xr-x  15 user  staff     480 Feb  1  2008 Folder1

drwxrwxrwx@ 23 user  staff     736 Oct 15  2017 Folder2


Command xattr reveals the type of metadata:


xattr Folder2

com.apple.FinderInfo


It can be removed with:


xattr -d com.apple.FinderInfo Folder2


and the folder icon is restored. The folders in question were carried through many backup/restore cycles and computer swaps, so they must be dating to much older OS versions, even pre-OS X. Probably that's why this does not affect everyone. I hope this helps.

Oct 15, 2019 3:03 AM in response to Kapitan Kloss

Very interesting Kapitan Kloss. Personally, I am unable to test this, because I no longer have an folders with the white generic document icon.


However a question for you: If I understand you correctly, the "xattr -d xxxxxx" command has to be used on every affected folder individually. If so, then if a person has hundreds or thousands of affected folders, then this is really not a practical solution, being as it would be very time-consuming to perform this operation on so many folders.


Also, although you don't mention it here, I am assuming that a person has to navigate -- via the Terminal -- to the actual location on their hard drive where each affected folder is located, using the "cd" command. Correct? Again, this makes it quite a time-consuming process for people who have dozens, hundreds or even thousands of such folders.


I am wondering, is there is possibly a batch "xttr -d" command which could automatically search out and change every affected folder, without knowing the actual folder names, kind of like a catch-all grep pattern?


If not, maybe someone more talented than I can write some kind of AppleScript or Automator script which could perform such a grep-like batch operation.


I am going to write to a talented AppleScript writer I know. Maybe he will be willing to help those of you who are still afflicted with this issue.


Oct 15, 2019 3:21 AM in response to WordWeaver777

Of course one can do all folders at a given level at once, ignoring error messages for those which do not have the extra attributes:


xattr -d com.apple.FinderInfo *


and yes, it does require navigating the folder hierarchy in the Terminal. It's not without a downside, since I think the command removes also other attributes, like labels, that you might actually want to preserve.


Maybe a proper form of the find command would let you do this recursively, but in my case I don't have enough of those folders to justify the effort...

Oct 15, 2019 9:39 AM in response to 4score

@4score Please don't post random links without any description of what it is or why you are posting it. For one thing you link could be a link to spam or trojans or adware crap. We don't know. Second, what is your experience with this app and have you actually tried it on the problem being discussed in this thread? Or are you just a shill for this piece of software which may be helpful or could just as easily be a giant POS designed to infect people's computers.


Also noting that they seem to be appropriating the nickname of "CCC" which has long been associated with Carbon Copy Cloner which makes me think these people don't care which makes me wonder further about this piece of sw.

Oct 16, 2019 12:46 AM in response to anssi1953

Anssi1953, please see my instructions further back in this thread. Using that Terminal method, you can fix multiple -- dozens, hundreds or thousands -- of folders within minutes, simultaneously. Please note that there is one error in my instructions, which I was not able to edit, because it was too late to edit when I noticed it.


The string "xattr -d com.apple.FinderInfo*" should actually be "xattr -d com.apple.FinderInfo *" with a space after "com.apple.FinderInfo". This command will drill down to every file and folder below the folder you are currently in. It does work, and quickly.


Another way to do it is to simply type "cd" in the Terminal, leave a space, and then drop a folder into the Terminal window. After that, use the "xattr -d com.apple.FinderInfo *" command to change all folders inside of that folder.

Oct 16, 2019 7:07 AM in response to WordWeaver777

I think it is not my job – and millions of other users in the community – to play around with terminal commands because of a mistake which Apple has made. I probably could do the thing, though. I started studying computer science in Helsinki University 1972 when there was only one computer size of three rooms in the house...


Now I'll just wait for an upgrade... This issue really doesn't have anything to do with usability. Just a cosmetic thing for me when using my computers.

Oct 16, 2019 11:58 AM in response to BaileyW

The com.apple.FinderInfo stores legacy ‘Finder Info’ and additional not documented information for the Finder. Known are the color-tag or the hide extension flag (like .txt or .jpg) from the Get Info. Catalina still creates FinderInfo but I don't know if it also depends on it or if it's for backwards compatibility. New folders don't get it, so it seems safe to delete the attribute for folders. But I prefer not to delete the FinderInfo from files - and that does the above published Terminal command also. The following Terminal command is more selective:


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


The "find . -type d" part outputs only the path of all folders (and folders in folders etc., another benefit of this approach) in the current Terminal directory, and passes that to the "-exec xattr" command (the {}). "2> /dev/null" inhibits a long list of errors for folders without FinderInfo. Because also nested folders are cleaned the execution can take some time if Documents or your user folder is your starting point.

But it should be clear: this is a Finder bug, misinterpreting com.apple.FinderInfo, and Apple should solve it, not maybe risky Terminal commands.


Oct 16, 2019 4:44 PM in response to henry vm

Hello Henry. Thank you for the additional information regarding the Terminal command, as well as the more refined command which only addresses folders, and does not touch other types of files. Well done! I was hoping to try out your refined command before I add it to my tutorial on my blog. However, I no longer have any generic folders on my machine with which to test it.





[Edited by Moderator]

Oct 16, 2019 6:12 PM in response to BaileyW

Hi all.


My problem with folder icons is different but still related to the Catalina upgrade.


My folders all retained the traditional blue folder icons. My problem is that many of my folders had icons that were a visual image of what was actually in the folder. Not only have I lost all of these 'customised' icons, but I can no longer add images (.jpg's etc) to replace the standard folder icons. I have always done this by simply copying the image and then, using the 'Get Info' option, using command+v to paste them into the icon.


Apologies for widening the problem. Terminal commands will not fix this, unless I am missing something.


Cheers....Scotty

Oct 17, 2019 2:25 AM in response to Scotty M

Hello Scotty,

There's hope. Unless Apple decided that custom icons are obsolete, they should still be there, it's just the current Catalina Finder that doesn't display them because of a bug. You can check in Terminal with:


ls -a path&nameofyourfolder


(easiest way to get that path&name into the command line is drag it from the Finder)

There should be an "icon?" file in the list, whose 'resource'-part contains the actual icon.


Oct 17, 2019 4:47 AM in response to BaileyW

Hello - yes same issue, but I have another theory.

I have noted previously that some folder icons were different to others. The newest ones (e.g. in the last ten years) are more or less completely flat whereas as older folder icons (when Apple designs was more 'skeuomorphic') were a bit more 3D angled and maybe had a hint of drop shadow. I can't remember how far back you have to go or when it changed, probably when Jonny Ive got rid of Note Pad's stitching and perforations (and quite right too).

Anyway, I reckon all the folder icons which now have generic document icon are my very oldest folders - maybe even predating OSX - so something changed in how these resources were stored or identified.

My only other note is that if you create a new folder, to get the right icon, and copy over all the contents, it is likely that your back up, or DropBox, or Carbon Copy Cloner will see this as a new item to be copied in its entirety, which may take time and possibly break recovery options. I don't know about Time Machine as I don't use it.

If you use the get info/copy&paste icon method, I don't think you get that issue and also, it's quicker .

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?



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 ID.