External drive error while moving files, now folder is inaccessible from Finder

I was moving some files from one external hard drive to another, while the system froze, and I had to reboot the hard way.

When I logged in again, the folder was looking semi-transparent (as it is when it's moving files, I'm guessing Finder puts some sort of flag to it). I would have done the operation back from the start, but the source folder was smaller than it was originally, which meant that some of the files were already transferred, albeit inaccessible (at least from Finder).

[Mon Oct 01 01:35:00 fede@4v4l0n42-3:/Volumes/data]
ls -lO
total 0
drwxr-xr-x   29 fede  staff  -  986B Jan 25  2012 lectures/

So, I copied the remaning files via Terminal, and they are all there now. I can access them via Terminal just fine. The problem is that Finder still shows the directory as semi-transparent, and I can't open it via the GUI.

[Mon Oct 01 01:48:05 fede@4v4l0n42-3:/Volumes/data]
ls -l lectures/
total 0
drwxr-xr-x  20 fede  staff   680B Dec 28  2010 RSA/
drwxr-xr-x   5 fede  staff   170B Dec 28  2010 TED/
drwxr-xr-x   3 fede  staff   102B Jan 20  2011 environmental science/
drwxr-xr-x   6 fede  staff   204B Jan 25  2012 general physics/

(I'd post a screenshot, but this is my first post and I need more reputation points).

I tried looking for some sort of weird flags on the terminal that the folder might have, but couldn't find any. I'm there is something, I just can't find it.

Ideas?


Solution 1:

chflags can set various options on a file that affect its display in Finder. See man chflags, which mentions that the existing flags on a file can be seen by using ls -lO.

Extended Attributes are also a possibility (although I think less likely for this issue): try ls -l@, or xattr -l filename to see those.

Solution 2:

I'm in the same boat with you, Fortunately I found the solution as following link http://www.windchilde.com/bluedepth/2013/08/16/grayed-folders-in-macintosh-osx/.

Simply run SetFile -d 'mm/dd/[yy]yy hh:mm:ss [AM|PM]' <file|folder> should solve this problem.