1

How can I repair the Icon in Resource Fork from a folder copied to a NTFS disk?

I recently backed up my dying SSD onto a NTFS drive using an older Snow Leopard Machine and almost all my data was saved. But all the folders lost their associated icons in this process. Some icon creators distribute their work in this way, assigning icons to folders and no contents in them.

I still have a file inside each folder named "Icon?" or "IconˆM" (when using the tab to complete its name in the terminal). This file is 0 bytes in size every time.

Is it possible to recover all these icons from all these folders containing the "Icon?" file?

  • 1
    The Icon? (or IconˆM) is always 0 bytes as it is not the file that actually contains the icon data. Depending on what OS and how you are looking at the copied data, there may be a ._Icon file in the folder along with the Icon? file or it might show up as a separate folder outside of the target folder as __MACOSX/$folder_name/._Icon, just depends on several different factors. That said, if either of those scenarios exists then an nee icon can be created form the ._Icon file. Let me know if you found this file. – user3439894 Feb 3 at 22:21
  • @user3439894 Now that would make a great answer - explaining how on different filesystems the resource fork might be written as a data file with a pattern that is established. – bmike Feb 4 at 0:12
  • 1
    @bmike, There just is not enough information to write an answer as there are many different factors and an absence of real technical information in the OP. That said though, you can not rule out the possibility of recovery just because the Icon? file is 0 bytes, which it's suppose to be. – user3439894 Feb 4 at 0:47
  • 1
    In terminal - ls -laR showing the Icon file and any other hidden files / directories would set to rest if the data is lost or just not where you expect it to be. @user3439894 is very precisely correct - Icon? of zero size is inconclusive whether you lost data or not. – bmike Feb 4 at 3:23
  • 1
    With a folder on the NTFS volume that has the Icon? file within it, what's the output of: ls -l@ /path/to/folder In the output after the line that has Icon? in it, is there both com.apple.FinderInfo and com.apple.ResourceFork? – user3439894 Feb 4 at 4:36
1

Repairing would mean you have a backup of the data that was lost. The resource data is gone if the size of the file is 0 bytes.

Look for backup copies of the apps or installers / download the apps / folders icons from a file system where that data was encoded correctly or support data and resource forks natively.

  • 1
    In reference to "The resource data is gone if the size of the file is 0 bytes"... In the case of the Icon? file being 0 bytes, which it's suppose to be, that does not necessarily mean the icon data isn't recoverable. If the __MACOSX/$folder_name/._Icon file is available then the icon can be recovered using a hex editor by removing the data in the file up to the icon header. It's a bit of a pain but doable if the file __MACOSX/$folder_name/._Icon file exists. – user3439894 Feb 3 at 22:01
  • 1
    Yes indeed @user3439894 - all is not lost if there are still encoded hidden files and folders. Thanks for pointing that out in case it saves other people too. – bmike Feb 4 at 3:24

You must log in to answer this question.

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