After offloading and organizing media from Sony media cards or GoPro devices, users may receive an error when attempting to delete the folders that the media was originally copied into.
On most Sony media cards, there is a "SONYCARD.IND" file. This is a special file used by the media card, and is permanently locked to protect it from accidental deletion.
If the "SONYCARD.IND" file is copied from the media card to a folder on the workstation or NAS share, the protection will persist, preventing users from deleting the file itself, as well as the the containing folders.
Frustratingly, the folders may appear to be empty, only to have one or more of these .IND files buried deep within the folder structure.
In GoPro directories, protected files such as "Get_started_with_GoPro.url" will also prevent deletion.
To resolve either of these, use Terminal to run the following command:
sudo chflags -R nouchg /Volumes/VolumeName/DirectoryName
Be sure to replace VolumeName and DirectoryName with the appropriate volume and directory names. Alternatively, users can type in
chflags -R nouchg, then simply drag and drop the folder to the Terminal window, which will automatically append the full file path.
This command will remove all Finder locks within the specified directory. The
sudo part is important, and will require that the administrator password is provided. When typing passwords in Terminal, the cursor will not move, but the keyboard input will be accepted.
Once the Finder locks are removed, users should be able to delete the .IND files, and the containing folders.
To prevent this issue altogether, it is best to simply ensure that the .IND files are not copied along with the media files when offloading content from the original device.