Apple - How to fix gray files in Finder?

This solved it for me! http://macadmins.psu.edu/news/2011/06/grayed_out_finder_folder

So, what happened? It appears that the folder's creation date was set to a random date in 1943. While we are unsure of how it happened, we did figure out how to fix it.

We used a few binaries that came with the Developer Tools, GetFileInfo and SetFile. GetFileInfo showed us the creation date of the folder. We overlooked it at first, but with closer examination it caught our eye.

$ GetFileInfo Test/ directory: "/Users/user/Desktop/Test" attributes: avbstclinmedz created: 06/13/1943 06:13:00 modified: 06/13/2011 15:07:33

We then could change the creation date using the SetFile tool.

$ SetFile -d 06/13/2011 Test/

After seting the date back to a reasonable time, we can see that it has truly changed.

$ GetFileInfo Test/ directory: "/Users/userid/Desktop/Test" attributes: avbstclinmedz created: 06/13/2011 06:13:00 modified: 06/13/2011 15:07:33

The folder then showed properly in the Finder and was again usable. We also found that if you created an alias of the folder, you could see the data and move it out. Once it was moved out into another folder, the old folder could be deleted.


Use ls -la to check if the file has extended properties. That will look similar to:

-rwxr-xr-x@ 1 user1 staff 439734882 Aug 16 21:34 myfile.zip

Look at the @ at the end. That stands for extended properties.

To view the extended properties, you'll need to use xattr -l filename command.

In many cases, the greyed out files have com.apple.FinderInfo attribute, that looks like:

com.apple.FinderInfo:
00000000  62 72 6F 6B 4D 41 43 53 00 00 00 00 00 00 00 00  |brokMACS........|
00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000020

To remove that attribute, run xattr -d com.apple.FinderInfo filename, and the file will get back to normal.

If you need to remove that attribute from all files recursively, you can run:

xattr -dr com.apple.FinderInfo .

Don't miss the dot . at the end that means the current directory.

Original post: https://tangentlin.wordpress.com/2013/10/18/greyed-out-files-in-mac-osx/


I solved this by using the duplicate command on the grayed out folder. The new folder will be accessible and the files can be moved to another folder. After moving the files, delete both folders (gray and copy), now both empty