Question

I had to erase my hard drive and restore it from backups. The one thing I’m having trouble restoring is the drive’s custom icon. I have a Time Machine backup that includes the .VolumeIcon.icns file that was in the root directory of the hard drive, but this file itself doesn’t have a custom icon, so it’s not possible to do the usual “copy the icon from one file’s Get Info window and paste it into the other file’s Get Info window” routine.

How can I take the icon from a .icns file and “paste” it onto another folder or file?

Était-ce utile?

La solution 2

I ended up opening doing this:

  1. Open the icns file in GraphicConverter.
  2. Select Edit → Select All (or press Command-A) to select the entire image.
  3. Select Edit → Copy → Copy (or press Command-C) to copy the image.
  4. In the Finder, select Go → Computer (or press Command-Shift-C) to navigate to Computer.
  5. Click on the hard drive you want to copy the icon to.
  6. Select File → Get Info (or press Command-I) to open the info window.
  7. Click on the small “proxy icon” to the left of the drive’s name.
  8. Select Edit → Paste (or press Command-V) to replace the drive’s current icon with the copied image. You may be prompted for an administrator password if you’re changing a drive icon.

The same procedure works on ordinary files and folders, too, not just drives.

Autres conseils

Using Finder go to the folder where the icns file is located. Open this icns file using Preview. Once the file is open click on select all in the edit menu item. Once you've selected all, open a file in Pages and paste the image in the new or old file. This file now contains the image.

The issue seems to be that you first need an original app/file/folder with that icon in order to Get Info and copy the icon to the intended destination.

I would suggest using Automator to create your own dummy "Application", assigning the icon. Once you have that application, you can copy the file to your Volume.

Rename your icon to AutomatorApplet.icns, then add it to the Resources folder of your Automator app.

Explained here:

https://apple.stackexchange.com/a/370/19829

Create an Application via Automator:

Create an Application via Automator

Licencié sous: CC-BY-SA avec attribution
Non affilié à apple.stackexchange
scroll top