So I have a new G-Drive with a snazzy custom icon. I want to certify it with SoftRAID before I write any data to it, which will basically reformat it, blowing away the custom icon. How do I back up the custom icon so I can reapply it later?
Thanks!
So I have a new G-Drive with a snazzy custom icon. I want to certify it with SoftRAID before I write any data to it, which will basically reformat it, blowing away the custom icon. How do I back up the custom icon so I can reapply it later?
Thanks!
If you do a “get info” on the volume, you should be able to select that icon and type CMD-C to copy it. Then paste it into something else (e.g. your favorite graphic editor) to save a copy. Then after reformatting the drive, you can do a get-info and copy/pate the image back.
Also, take a look at the root directory of that volume from a command-line session. I don’t know if it will work for drives, but when folders have custom icons, they contain a hidden file named Icon\015
(where \015
is a CR character). The file is zero-length, but with two extended attributes: FinderInfo and a ResourceFork. For example, I put a custom icon on my /Applications/Games
folder:
$ cd /Applications/Games/
$ ls -la@B
...
-rw-r--r--@ 1 username admin 0 Jun 17 2012 Icon\015
com.apple.FinderInfo 32
com.apple.ResourceFork 42232
...
So if your device has this file, maybe you can back it up and restore it after erasing the device.
Create an empty folder somewhere, e.g. “G-Drive Icon”. Get Info on the drive. Click on the icon. Command-C to copy. Get info on the folder. Click on the icon. Command-V to paste.
A folder is a zero-length way to save an icon.
Thank you, @Shamino and @mschmitt, for your suggestions. If I look at the root of the drive, I can see that there is indeed an invisible .VolumeIcon.icns
file. I can probably just copy that, minus the leading dot in the destination filename, and put it somewhere, restoring the leading dot when ready.
In classic Mac OS, a custom volume icon was stored as it is for folders, the way that @Shamino described. From the first version of Mac OS X, for reasons known only to Apple (maybe to support non-resource fork volume icons on ISO CDs?), they changed custom volume icons to be stored in the .VolumeIcon.icns
file you found.
You can definitely back up this file. But the easiest way is really to create a folder and change its icon to the custom one as @mschmitt describes. It is much easier to re-apply to your reformatted drive that way. And you can keep the folder with custom icon somewhere for future use. This is what I do every time I get a new device:
Note that there is a shortcut to the Get Info ➞ Copy ➞ Get Info ➞ Paste
procedure. You can Get Info
on the target folder/volume (where you want to apply the custom icon) and simply drag and drop the folder/volume with the custom icon onto the icon in the top left of the Get Info window (you’ll see the green +
circle appear next to the cursor which doesn’t appear in my screenshot):
Just noted, you bleeped out the user name in your screenshot but you left it in plane sight in the console log. Or perhaps, that’s just a spoof.
d’Oh. Yes, I try to avoid presenting my last-name in public forums, just in case someone gets offended by what I write and decides to take revenge off-line. (Many decades ago, when I was living elsewhere, someone decided to look my address in the phone book and publicly shared my address and phone number.)
I’ve edited the post, but it’s obviously far too late for that to matter.
The change must have been later than the first version of Mac OS X. I added this icon (via copy/paste from the Get Info window) back when I was running 10.2 or 10.3 (note that I drew my Pac-Man monster over the diagonal pin-stripe folder that was part of the original Aqua interface).
It’s only custom icons for the root of volumes that have a ‘new’[1] file and location in Mac OS X 10.0+. Folder icons still use the Icon^M
(filename is actually ‘IconCR’) file with the icon contained in an ICNS resource in the resource fork. So if you add that custom icon to another folder on the latest version of MacOS, the output of ls -la@
would be the same.
I put the word new
in inverted commas because Mac OS X/MacOS is now 6 years older than the classic Mac OS ever was (Mac OS 9.2.2 released was 17 years after the first). ↩︎
Thanks for that bit of info. I’ll go update my post now…