Fix inaccessible and grayed out folders in the OS X Finder

FinderIconYosemiteXAll files and folders that you encounter when browsing the Finder in OS X should be displayed in regular font and icon color; however, there may be times when this is not the case, and one or more folders may appear grayed out and otherwise faded. When this happens, you will not be able to open the folder, and unlike other folders that may show a small entry triangle next to them in list view, these will not have options for viewing what is inside.

This display usually means the folder is not accessible at a low level, and this in turn is likely from either a fault in the filesystem entry for the file, or damage to your Mac’s hard drive formatting. This damage may happen from an interruption in a file or folder copying process, such as might happen from a power failure, crash, hard-reset, forced-cancel, or sudden disk unmount. This can also happen if you are using an unsupported storage setup, such as a software RAID array (especially those from third-parties), in which case you might see many (if not all) of your folders duplicated (see below).

Finder gray folders

Otherwise accessible folders may appear grayed and be inaccessible (click image for larger view).

Regardless of the reason, the result is you cannot open the folder, and other programs may not be able to open it either.

Overcoming the problem

This problem should be distinguished from the viewing of hidden folders in the Finder. OS X contains a number of hidden folders to keep your system looking clean, but there are hidden settings that can be activated to show these folders. When done, the folders will appear grayed; however, unlike this problem, they will be accessible. Nevertheless, for starters, open the Terminal utility (in Applications > Utilities) and run the following command to disable this hidden folder view (if enabled):

defaults delete AppleShowAllFiles; killall Finder

One potential cause for this issue is if the interruption caused the system to improperly set the folder’s creation or modification dates. Since the fix for this is relatively easy, this should be the first step you try for recovering the lost folder:

  1. Open the Terminal utility (in Applications > Utilities)
  2. Type the following command, followed by a single space (this space is important). The first eight digits here represent the date and time, in this case being January 1, 2015, with the trailing zeros being hours, minutes, and seconds, indicating midnight. This is a relevant date and time for a folder to be created:
    touch -t 20150101000000
  3. Copy and paste, or drag and drop, the grayed-out folder from the Finder to the Terminal window, so its full path is entered after the previously typed command (again with a space between the last number and the pasted file path). If you cannot select the file, then drag its parent folder to the Terminal window, followed by deleting the trailing space and then appending a slash followed by the folder name (i.e., “/foldername”) to the folder path.
  4. Press Enter to run the command, which will update the access and modification time stamps for the file.

Drive Repair Tools

If the above approach does not work, then your best bet to recover your drive is to reformat it and restore your Mac from a backup; however, if for some reason you need to preserve your drive (e.g., you do not have a backup), then alternative approaches include using drive utilities in an attempt to repair your drive. Apple’s Disk Utility can be used to run a general fix on your drive (when done in Recovery Mode); however, for directory corruption issues, Alsoft DiskWarrior and some other third-party tools may be useful. With these tools, you can attempt a directory rebuild, or filesystem repair routine, and see if these will fix any errors and make the folder and its contents available again.

Recovering data from the folder

Hopefully you have a backup of your files so you can safely format your drive if needed; however, if not then before formatting to clear the problem, you might be able to recover the data stored in the problematic folder by using a sequence of Terminal commands:

  1. In the Finder, create a folder named “Temp” on your Desktop
  2. Select the problematic grayed-out folder, and press Command-C to copy its path.
  3. Open the Terminal utility
  4. Type “mv -v” followed by a single space, and then press Command-V to paste the copied folder path.
  5. Press Delete once and then type “/* ” with a single space following the asterisk.
  6. Locate the new Temp folder on your Desktop, and then similarly select it and press Command-C to copy its path.
  7. Paste the path in the Terminal, so the full command will look similar to the following:
mv -v /Path/to/the/folder/* /Users/username/Desktop/Temp

With this command assembled, pressing Enter should move the folder’s contents to the new Temp directory. You should see each file listed as it is moved, and when done the Terminal will drop you back to the command prompt. You can now back up the files, and then consider formatting your drive and restoring your files.

Managing Software RAID arrays

If this problem is happening for all folders on a software RAID array setup and resulting in all folders showing up in grayed-out duplicate, then the problem is very likely with your RAID configuration, and you will need to fix it either using the configuration utilities for your array, or by backing up your data, destroying the array, and rebuilding it. If the problem continues, then your RAID array might have a faulty drive, in which case you might look into replacing it, or optionally moving to another RAID setup that might be more compatible with your drives and your Mac.

10 thoughts on “Fix inaccessible and grayed out folders in the OS X Finder

  1. Strod

    One small comment regarding step #3 at the end of the section “Overcoming the problem”:
    If the neurotic folder giving you trouble has one or more spaces in its name, then typing it like Topher suggests (i.e., “/folder name”) will fail. You will need to “protect” the spaces with a backslash: “/folder\ name”
    The same holds true of other special characters including parenthesis, question marks, exclamation marks, and many others. All those must be protected: \?, \(, \), etc

  2. Alejandro

    System error “touch: out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS]” when I try to run command.

      1. Strod

        There’s a typo in that instruction as specified in the article. If the file you want to “touch” is called myFile.doc, the instruction should be:
        touch -t 201501010000.00 myFile.doc
        Notice the dot separating the seconds (that’s what [.SS] means in the error message).

  3. watson xi

    touch didn’t work for me, but moving all the enclosed items to a new directory did via terminal

  4. michael

    Useless article. It doesn’t work. Perhaps authors should learn to proofread and test before posting?

  5. Richard

    Hey, I just copy pasted the greyed out folder to a new location and it all worked out splendid. Deleted the greyed out folder and that was it for me.. Wonder if this is the same issue we’re discussing here?

  6. Neil P

    I just had this, and even on a folder that was residing on a NAS4Free fileserver, an app called FileXaminer from Gideonsoft Works, changed the created date within a couple of clicks.

Comments are closed.