Comments Missing from Files on Mac mini

Running Sonoma 14.2.1 on M1 2020 MacMini. I copy or enter text reference information into File Comments (via GetInfo>Comments) and all seems fine until a restart. If I copy files to a flash drive, I can copy the files, and Comments are in place. But with Flash Drive dismount/remount the comments on the flash drive files are gone. Also, on Mac restart the file comments disappear. I've tried to replicate and sometimes the Comments are still there after restart, but eventually, after a few restarts the Comments are gone.


I saw a 2021 post about this, without confirmed cause or corrective action. One action was to run a script to restore the comments but as far as I can tell, the comments are totally gone from all files on my Mac.


Any further help on this?


[Re-Titled by Moderator]

Mac mini, macOS 11.2

Posted on Jan 1, 2024 3:04 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 3, 2024 7:23 AM

Thanks for pointing out that was too lazy in my initial test.


You are right: Finder no longer displays comments from exFAT (MBR) volume after it is re-mounted. But the metadata tags are still there and can be exported with this command:


exiftool -q -s3 -if '$MDItemFinderComment' -p '$filename: $MDItemFinderComment' . 2> /dev/null > comments.txt


How can I export file comments in Finder … - Apple Community


Or update the files so Finder again displays their comments:


exiftool -m -P -ext txt -ext jpg -overwrite_original_in_place -tagsFromFile @ -MDItemFinderComment .


Notice that exiftool by default does not handle .txt files so it must be defined with '-ext txt' option. On the other hand, .jpg files do not need that if only they are updated. I copied the test files to an APFS volume before that command. For some reason on a FAT volume it worked only for a .jpg file and a .txt file did not reveal Finder comment until it was copied to APFS and that command was executed.


APFS and MacOS Extended do not lose Finder comments after re-mounting.

Similar questions

14 replies
Question marked as Top-ranking reply

Jan 3, 2024 7:23 AM in response to VikingOSX

Thanks for pointing out that was too lazy in my initial test.


You are right: Finder no longer displays comments from exFAT (MBR) volume after it is re-mounted. But the metadata tags are still there and can be exported with this command:


exiftool -q -s3 -if '$MDItemFinderComment' -p '$filename: $MDItemFinderComment' . 2> /dev/null > comments.txt


How can I export file comments in Finder … - Apple Community


Or update the files so Finder again displays their comments:


exiftool -m -P -ext txt -ext jpg -overwrite_original_in_place -tagsFromFile @ -MDItemFinderComment .


Notice that exiftool by default does not handle .txt files so it must be defined with '-ext txt' option. On the other hand, .jpg files do not need that if only they are updated. I copied the test files to an APFS volume before that command. For some reason on a FAT volume it worked only for a .jpg file and a .txt file did not reveal Finder comment until it was copied to APFS and that command was executed.


APFS and MacOS Extended do not lose Finder comments after re-mounting.

Jan 4, 2024 8:55 AM in response to stevenfrombellefontaine

> mdls via Terminal on one of the files on my ExFat formatted flash drive. I see that FinderComment is indeed there, but it shows as ""


Yes, it seems that a exFAT/FAT volume does not generate the needed MDItemFinderComment from the XAttrMDItemFinderComment like an APFS or MacOS Extended volume do.


The only option seems to use APFS or MacOS Extended format. If the files have been on non-Mac volumes then the comments still might well be there but are not displayed until the files are moved to a Mac-formatted volume and a command like below is used to reveal them.


exiftool -m -P -ext txt -ext jpg -overwrite_original_in_place -tagsFromFile @ -MDItemFinderComment .


What kind of documents do you share with other users? Are they Mac-only or also Windows and Linux users?


Image files support IPTC/XMP metadata that is cross-platform and robust. AFAIR .pdf supports internal metadata that might be useful for this purpose.

Jan 4, 2024 8:35 AM in response to VikingOSX

Thanks for your assistance. I'm not code/syntax proficient, but I ran mdls via Terminal on one of the files on my ExFat formatted flash drive. I see that FinderComment is indeed there, but it shows as "".



When I ran mdls on a file I'd put on my OSExtended format flash drive, it returned the ItemFinderComment, just as I'd entered it, even though the Comment is no longer visible in OS Finder/GetInfo. And I get the same results when I run mdls on one of my MacMini files that no longer show comments. However, when I run mdls on a file that never had any comments entered, the ItemFinderComment field does not show up in mdls list at all.


So this confirms to me that the Comments that I'd entered are available from my original file entries on my Mac - that's great news. They just don't show up in the Mac Finder Comment in Finder List View. So while I'm glad that I didn't lose all that work, I still don't have an easy way to provide the Comment content to others. My intention was to allow others to view the Comments with the same ease as all of the other fields shown in Finder View Options. If they can't see them without running some script or 3rd party software, then my file comments are useless to them.


So, obviously Mac GetInfo and Finder Comments List View fields don't show ItemFinderComment. And ItemFinderComment is all that's left behind after system shutdown/restart, or Flash Drive dismount/remount. Do you think this is by design or is it a flaw in the OS behavior?. It just seems bizarre that I can copy text as a Comment in GetInfo, and that it stays in place until a system shutdown/restart wipes the GetInfo Comment, but leaves ItemFinderComment in tact.

Jan 2, 2024 10:46 PM in response to stevenfrombellefontaine

Finder comments are stored in XAttr metadata:


exiftool -a -G1 -s -api RequestAll=2 a.txt 
[MacOS]         MDItemFinderComment             : Finder comment
[MacOS]         XAttrMDItemFinderComment        : Finder comment


I tested this and those tags survived a detour to exFAT and FAT (MBR). But that test was done on the Mac so they might not survive a detour to Windows.


AFAIK it is possible to insert metadata to formats like .pdf that should be robust. Or a sidecar file that has metadata.

Jan 4, 2024 9:57 AM in response to stevenfrombellefontaine

> upon shutdown/restart on my Mac or dismount/mount on my flash drive (OS Extended) the visible Comments are gone


In my tests MacOS Extended and APFS volumes preserve visible Finder comments after unmount and reboot. Maybe your were too fast and there was no enough time for the system to generate the needed MDItemFinderComment from the XAttrMDItemFinderComment? I've noticed that it might sometimes take a while (maybe 30 seconds or more?) for that to happen.

Jan 3, 2024 5:59 AM in response to Matti Haveri

Matti,


Although the Finder comment metadata travels with the file to the mounted exFAT drive, and a Get Info prior to unmounting the drive does show the comment, a subsequent eject and remount of the drive loses the Get Info comment text.


The comment metadata tag remains on the file and so does the actual comment — it's just not visable in the Finder via Get Info or in a List view Comments field. The following proves that the comment remains on the file:



Copying the same file back to an APFS formatted filesystem location does not restore the comment in a Get Info panel.

Jan 4, 2024 10:39 AM in response to stevenfrombellefontaine

> .pdf option?


I did a quick test with .pdf which seems to behave essentially the same as image (.jpg etc) and movie (.mp4, .m4v, .mov) files.


For example, add the following tags to a .pdf with exiftool:


exiftool -overwrite_original -api LargeFileSupport=1 -Author='Charles Dickens' -Title='A Tale of Two Cities' -Subject='A historical novel set during the French Revolution' document.pdf


It is stored as:


exiftool -a -G1 -s -api LargeFileSupport=1 document.pdf         
[PDF]           Author                          : Charles Dickens
[PDF]           Title                           : A Tale of Two Cities
[PDF]           Subject                         : A historical novel set during the French Revolution
[XMP-pdf]       Author                          : Charles Dickens
[XMP-dc]        Title                           : A Tale of Two Cities
[XMP-dc]        Subject                         : A historical novel set during the French Revolution


"The above command used on a PDF will write to both the PDF tags and the XMP tags, which should cover all the bases."


Finder > Get Info and Preview.app > Inspector display that as:




exiftool does not yet support writing to formats like .txt, .docx, .xlsx, .pptx but you might ask its developer if that is possible.


GraphicConverter 12 has an easy GUI to add Title and Caption/Description to .pdf (and to images and movies) that Finder > Get Info and Preview.app > Inspector display as follows. You might ask its developer to if it possible to add more options.



[XMP-dc]        Title                           : GraphicConverter Title
[PDF]           Title                           : GraphicConverter Title
[PDF]           Subject                         : GraphicConverter Caption/Description


https://exiftool.org/forum/index.php?topic=11650.msg62568#msg62568

https://exiftool.org/TagNames/PDF.html

Jan 2, 2024 2:17 PM in response to Matti Haveri

Thanks for your response. I've tried FAT-32, EXFat and MacOS Extended. All have the same result.


And by the way, where do you put the important info that relates to the file? Comments seemed perfect to me. I even talked to Apple support before investing many hours. I wanted to be sure that the Comments field would be appropriate for long text descriptions and such.


I'm currently working with hundreds of media files and even with long file names, I've not been able to come up with a way to link the Who, What, Where, When, Why information without proprietary software.

Jan 4, 2024 8:54 AM in response to Matti Haveri

I see that using mdls in Finder shows kMDItemFinderComment that has the Comment I'd entered in the GetInfo Comment. Yet upon shutdown/restart on my Mac or dismount/mount on my flash drive (OS Extended) the visible Comments are gone. So it seems to me that ItemFinderComment is not mapped to the field that is visible in GetInfo Comments and Mac Finder list view Comment. Am I on the right track? If so, my plan to make my file comments available to others would need to be accomplished in some other way.


More on the .pdf option? Were you thinking that I could put a media file in a .pdf with annotation? Or perhaps using a .pdf with hyperlinks to the media files?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Comments Missing from Files on Mac mini

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.