Fix a grayed-out Finder folder

I was using Gemini today to try to clear out some duplicate files and I noticed that I was having permissions issues with some of the directories I was searching. These directories had traveled across multiple Macs and external drives, so I wasn’t terribly surprised – except that there was one folder I could seem to get access to with Finder. It was grayed-out and inaccessible, though I could navigate to it through Terminal. I tried making myself the owner, I tried settings the permissions to 777, I tried editing the extended attributes (there were none).

Finally I found a solution which uses SetFile – part of the Xcode installation. At some point, it seems a file transfer was interrupted in the middle of copying this directory and it turns out that Finder temporarily sets the created date on a file or directory to a really old value which renders the file or folder inaccessible (probably so you don’t get in and much around while the data is copying). When a file transfer is ungraceful interrupted, Finder might not know or might not be able to correct the date. The article I found said that the date would be set to 06/13/1946, but when I checked this particular directory, it was set to January 24, 1984. Either way, it was way too old.

sh-3.2# SetFile -d 22/02/2014 Music/ #(Or any reasonably recent date)

That cleared the problem right up!

If you don’t have Xcode tools installed, you can actually achieve the same thing with touch.

sh-3.2# touch -t 201402221100 Music/

The -t flag tells touch to modify the created date (-mt will change the modified date) and the numbers indicate the year, month, date, hour, and minute (YYYYMMDDhhmm).

3 thoughts on “Fix a grayed-out Finder folder

  1. touch didn’t work for me, but I was able to fix this via just copying the contents of the folder to another via Terminal.
    mkdir Foldername2
    cp -r Foldername1 Foldername2

    Then on another mirrored drive with the same folder, I’m trying just a command-D duplicate in Finder and that seems to be working as well.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s