2

I have a NAS, which I use for storing my old photos. When moving the remainder of my 2016 photos, the following problem occurred, but without any error message during the move operation. The move operation was done by holding the cmd-button while dragging and dropping in Finder. In Finder on OS X version 10.11.6, the directory looks like this:

Directory listing in Finder

Using Finder, I can enter directories like 2016-10-15, but not the ones with different icons. 2016-11-27 is a directory, and 2016-12-01 should not be shown twice, but is a result of the erroneous move operation.

I have researched online to figure this out, but have not yet found a solution. One of the possible explanations was extended attributes. I ran a xattr -c * to clear all of the attributes. This did remove the attributes, but didn't solve the problem.

I can enter the directories using Terminal.

machinename:2016 user$ ls -al 2016-11-27
total 34600
drwxr-xr-x  1 user  staff       264 24 Jan 21:18 .
drwxrwxr-x  1 user  staff      7606 16 Mar 20:14 ..
-rw-r--r--  1 user  staff   1339112 24 Jan 21:05 2016-11-27 08.47.29.jpg
-rwxrwxrwx  1 user  staff  12069896 27 Nov 16:58 DSC_0151.JPG

Any other ideas on how to fix this?

  • Emphasizing "moving" means: you moved the folders from the local Mac to the NAS share with cmd-shift? – klanomath Mar 26 '17 at 13:00
  • @klanomath, yes exactly, moving (not copying) by holding the CMD-key while dragging and dropping in Finder. – Kristian Mar 26 '17 at 16:11
1
+25

From the symptoms you describe I suspect a damaged .DS_Store file in the parent folder.

Try deleting it while the folder is closed in the Finder. Close all open windows in the Finder, then in Terminal rm .DS_Store while in the directory. This should be the same directory you were in when you ran the command in your question. Now open . will open the directory in the Finder and all should be OK. If that doesn't work you could also try deleting the .DS_Store in the directory above.

If neither of those work then I would try copying the entire folder tree in Terminal using the cp command.

|improve this answer|||||
  • I tried to run a find . -name '.DS_Store' -type f -delete in the parent directory, but this didn't work out. Copying the files in Terminal didn't either. – Kristian Mar 30 '17 at 19:32
  • Try the find again and remove the -type -f since it may cause a problem. Note that you want to run it in the folder above the one that contains the problem folders – Tony Williams Apr 3 '17 at 5:57
  • Thanks, Tony - I tried to run # find . -name '.DS_Store' -delete -print once again, and only got ./2016/.DS_Store as the result (which means that the -type f worked previously)... I'm out of ideas. – Kristian Apr 3 '17 at 17:30
  • What happens if you go in to one of the directories that won't open in the Finder in the shell and then go open . ? – Tony Williams Apr 4 '17 at 8:09
  • It opens a new Finder window with the folder selected as an object within the parent directory - i.e. I can't see the contents of the directory in Finder. – Kristian Apr 6 '17 at 15:44
0

Finally managed to find a solution using the following steps:

1) Took a complete backup of the main photo folder using tar.

2) Figured out which file types I had (while keeping in mind that jpg and JPG are not identical)

find . -type f | awk -F . '{print $NF}' | sort | uniq -c | awk '{print $2,":",$1}'

3) Then copied the files using rsync, specifying each file type from the above result (it was the 2016-folder that had issues, so I copied the files I positively knew I wanted to 2016-test):

rsync -zarv --include="*/" --include="*.AVI" --include="*.JPG" --include="*.MOV" --include="*.jpg" --include="*.mov" --include="*.mp4" --include="*.png" --include="*.ini" --exclude="*" 2016/ 2016-test/

|improve this answer|||||

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .