Replace movie icon

Hello,
I'm newbie on this forum so I apologize if I'm not posting at the right place.
I have a external HD with a hundreds of folders. Each folder contains two files having same name but different format: a pic file (AAAAA.jpg) and a movie file (AAAAA.avi or AAAAAA.wmv). For each movie, I would like to replace the icon (available in the GET INFO menu) with the picture of the corresponding .jpg file.
Is there any possibility to do it automatically using automator ?
The only solution I found so far is to do it manually by opening the pic file, copy the pic, open the "get info" menu of the movie file and then paste the pic as icon.
Thank you in advance for your suggestion,
Banpo

This is more of an AppleScript situation, although you can put a script into an Automator workflow. There are some utilities in the *Developer Tools* (an optional install on your OS installation disk) that can be used to create and set icons. If you have these tools installed (specifically, Rez, DeRez, and SetFile), give the following a try:
1) *Get Specified Finder Items* (or however you want to get the input items)
2) *Filter Finder Items* { Find files where kind is folder } -- limit input to folders
3) *Run AppleScript* (paste the following script):
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px; height: 340px;
color: #000000;
background-color: #DAFFB6;
overflow: auto;"
title="this text can be pasted into an Automator 'Run AppleScript' action">
on run {input, parameters} -- set a file icon
gets an image from the first jpg file of a folder, and sets it as the icon for the first non-jpg file of a folder
input [Finder Items]: folders to process
output [Finder Items]: folders successfully processed
set output to {}
set skippedItems to {} -- this will be a list of skipped items (errors)
try -- check for required tools
get POSIX file "/Developer/Tools/" as text as alias
on error
error "required Developer Tools not installed"
end try
repeat with aFolder in the input
set aFolder to contents of aFolder
try
tell application "Finder"
set theName to name of aFolder
set iconFile to (first file of aFolder whose name extension is "jpg") as alias -- find the icon image file
(duplicate iconFile to (path to temporary items) with replacing) as alias -- make a temporary copy
set tempImage to quoted form of POSIX path of the result
set destination to (first file of aFolder whose name extension is not "jpg") as alias -- get the other file
set destination to POSIX path of destination
end tell
set tempResource to quoted form of (POSIX path of (((path to temporary items) as text) & "SetIconTempResource"))
do shell script "/usr/bin/sips -i " & tempImage -- add a Finder icon to the image
do shell script "/Developer/Tools/DeRez -only icns " & tempImage & " > " & tempResource -- get the icon resource
do shell script "/Developer/Tools/Rez -a " & tempResource & " -o " & quoted form of destination -- add resource to the file
do shell script "/Developer/Tools/SetFile -a C " & quoted form of destination -- set custom icon attribute
set the end of the output to aFolder -- success
tell application "Finder" to update (destination as POSIX file)
on error errorMessage number errorNumber -- oops
log errorMessage
set errorNumber to "  (" & (errorNumber as text) & ")"
-- set the end of skippedItems to (aFolder as text) & errorNumber -- full path
set the end of skippedItems to quoted form of theName & errorNumber -- just the name
end try
try -- remove temporary files
do shell script "rm " & tempImage & space & tempResource
end try
end repeat
showSkippedAlert for skippedItems
return the output -- pass the result(s) to the next action
end run
to showSkippedAlert for skippedItems
show an alert dialog for any items skipped, with the option to cancel the rest of the workflow
parameters - skippedItems [list]: the items skipped
returns nothing
if skippedItems is not {} then
set {alertText, theCount} to {"Error with AppleScript action", count skippedItems}
if theCount is greater than 1 then
set theMessage to (theCount as text) & space & " items were skipped:"
else
set theMessage to "1 item was skipped:"
end if
set {tempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
set {skippedItems, AppleScript's text item delimiters} to {skippedItems as text, tempTID}
if button returned of (display alert alertText message (theMessage & return & skippedItems) alternate button "Cancel" default button "OK") is "Cancel" then error number -128
end if
return
end showSkippedAlert
</pre>
4) other actions as desired

Similar Messages

  • New Quicktime movie icon

    Hi,
    Is there any way to change the new generic QuickTime movie icon.
    Not the program icon. I've already done that, disposing of the grotesque silver Q filled in blue!
    It's the smaller icon I wish to replace. The icon for each movie file. Sure, I can change each one individually (plod plod plod). But I would like to just replace the generic, so that each time I download or rip a movie I do not have the silver Q filled in blue on the AVI or MOV white rectangle.
    I have Candy Bar, but can't figure out how to do it!
    Other than that, SL rocks!
    Martin

    I don't think Candybar can do it. it can change the icon for teh app itself but not the icons you want. you'll have to do it yourself. control-click on Quicktime player.app and select "show package contents". go to Contents->Resources. There are lot of icons 9and other stuff) in there including icons to be used for all file types like MPEG-4.icns, Movie.icns etc. you have to replace them with your own .icns files. I suggest you back up Quicktime Player.app before trying this.

  • How can i move icons from one screen to the other?

    How do i move icons from one page to another?

    Tap and hold any icon for a couple of seconds. They'll all start to wobble. Tap and drag the one you want to move to the side of the screen and the next screen will appear; drop the icon on whatever screen you want it on.
    You can also do it quicker in iTunes - connect the phone and click the Apps tab in the main window. You'll see a picture of your phone with the apps laid out. Just click and drag

  • I just noticed that some of the movies I had in iTunes did not get transferred to the iPhone. The missing movies are shown as generic movie icons in the iTunes panel. How do I get the original movies to show up again and transfer to the iPhone?

    I just noticed that some of the movies I had in iTunes did not get transferred to the iPhone 5. The missing movies are shown as generic movie icons in the iTunes panel and are checked to select them. But they do not show up in iPhone Videos. How do I get the original movies to show up again and transfer to the iPhone? I recently upgraded Mac OS to 10.6.8

    1. iTunes won't offer cloud downloads for songs that it "thinks" are in your library, even if it "knows" the files are missing. If you've exhaustively searched for the missing files and there is no prospect of repair by restoring to them to their original locations, or connecting to new ones, then delete that tracks that display both the missing exclamation mark and are of media kind Purchased/Protected AAC audio file. Don't hide from iTunes in the cloud when asked, close iTunes, then reopen. You can download from the cloud links or iTunes Store > Quicklinks > Purchased > Music > Not on this computer > All songs > Download all.
    2. Why? Not sure, perhaps 3rd party tools or accidental key presses combined with previously hidden warning messages when trying to organize the library. There is a hint that using the feature to downsample media as it is synced to a device may also be involved, though I've not replicated it. Whatever the reason a backup would protect your media.
    tt2

  • TS3274 How do I move icons from one screen to another?

    How do I move icons from one screen to another. 

    Hold down on one icon until they start shaking, then drag the icon to the edge of the screen, and the screen should slide to the next one, you can then drop it on that screen or drag it again to the edge to move to the next screen.
    Page 21 of the user guide explains this under Arranging Apps:
    http://manuals.info.apple.com/en/ipad_user_guide.pdf

  • How do you move icons from one page to another?

    How do you move icons from one page to another?

    hold down on an app till everything start shaking then move it to one side of the ipad and it'll change "pages" after a second or two.

  • How do you make the movie icons smaller in the new iTunes?

    I recently updated my iTunes to the lastest version (11.0).  In the previous version I could adjust the movie icon sizes to make the icon larger or smaller.  I can't easily figure out how to do that anymore.  Does anyone know if it is possible to adjust the movie icons in the new iTunes?

    If there is an option for adjusting the size of the movie icons, I haven't been able to find it.
    Regards.

  • Can't drag, drop, or move icons from dock

    The issue exactly is that I can no longer move icons to the dock, remove them from the dock, reorder them, or delete them. The context menu still works fine, I just can't drag and drop. Furthermore, if I attempt to drag and drop from a stack, it reads the action as if I am trying to open the file.
    I'm running Yosemite 10.10.1
    Things I've tried so far:
    Repair disk permissions
    Repair ACL permissions
    Rebuild directories
    Relaunch dock
    Reset dock to defaults
    Rebooting/logging out (both fix the problem temporarily, however it returns within an hour of regular use)
    Trying to hunt down any extensions that might be causing issues...can't find anything (problem persists in guest account as well)
    Rebuild and repair kexts
    Cleaned out all caches
    Reinstalled OS X
    Wiped disk and performed clean install.
    I don't have anything installed that does any low level modifications (no third party antivirus or tweaking/tune up tools). For the life of me I can't figure this one out and it's really getting annoying to not be able to use my dock.

    Applications/Utilities/Terminal enter the command
    killall Dock
    Log out/in test. If it works okay, delete the .db from the desktop.
    If the Dock is the same, return the .db to where you got them from, overwriting the newer ones.
    If you prefer to make your user library permanently visible, go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J.  When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder.  Learned from leonie.

  • What is the box in mail app between the move icon and reply icon?

    Hello,
    Just started using mail in the new ipad and see an icon in the inbox on the left handside in between the move icon and the reply icon. What is it and what does it do to a file? I clicked an old email on it and it seemed to have stored it or did it delete it. Thanks for your help in this matter.

    Do you mean the icons towards the top right-hand side of the Mail app ? Depending on what type of account it is it might be a trashcan for deleting an email, or if it's a Gmail account you may currently have it set to as an archive icon : http://support.apple.com/kb/HT4207
    What is archiving : http://mail.google.com/support/bin/answer.py?answer=6576

  • No Movies icon on Apple TV ..dec 27th 2012

    NO icon for movies so cannot access films...tried everything but still same.
    MUst be Apple problem.....oh we'll good for Virginmedia...their movies work ok

    Welcome to the Apple Community.
    Is this just the movie icon or others as well. There appears to be an issue with movie or TV shows at present, but if other icons are missing you may have a different issue.

  • Movie icons don't get a preview on the desktop like jpegs do.

    Hi,
    I have .jpeg, .wmv and .mov files on my dektop and have set up the desktop so that all icons get a preview pic. But only the jpegs seem to show the preview pic. The movie files simply show a white and blue 'Q movie' icon. Sometimes they show the preview of the movie but more often than not they display the default 'Q movie' icon.
    Anyone know how I can remedy this please?
    Thanks.

    shamswahid,
    It's all about what can be viewed natively in Quicktime, and what cannot. WMVs, for example, require that the "Flip4Mac" components be installed. This allows Quicktime to open and play the files, but it does nothing for previews in the Finder.
    Similarly, if a file requires that a third-party codec be installed in order for Quicktime to play the file, previews will probably not be generated.
    Scott

  • Has anyone had problems with unable to rent movies from apple tv? I can watch movies on Netflix fine but when I click on the Movies Icon it acts like it's about to show the movie selections then it goes right back to the home screen!! Please help!!

    I can watch Netflix fine from Apple tv but when I click onto the Movie Icon it acts as if it's about to show the movie rental selection then goes back to the home screen. Please help!

    My problem was solved by Winston Churchill. Step #2

  • After downloading a movie to my iPad it is blocked with the word  "processing" under the movie icon. What should I do?

    After downloading a movie to my iPad it is blocked with the word  "processing" under the movie icon. What should I do?

    Do you not want a backup of the iTunes content on your computer in the event the iPad is lost, stolen, or simply fails?

  • How to recover missing movie icons

    Is there a way to recover movie icons for the iPad?  I can't remember if they were on the screen when I first them or not...ugh. 

    See if it reappear if you disable all restrictions.
    Settings>General>Restrictions

  • UITableView not displaying delete/move icons??

    I have a viewcontroller that implements the UITableViewDelegate
    @interface SettingsViewController : UIViewController <UITableViewDelegate> {
    IBOutlet UITableView *settingsTableView;
    I implement the methods that should show the delete/move icon buttons in the table but they won't show up. Can't figure out why??
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
    self.title = @"Settings";
    self.tabBarItem.image = [UIImage imageNamed:@"Gears.png"];
    UINavigationItem *navigationItem = self.navigationItem;
    navigationItem.title = @"Name Settings";
    self.navigationItem.leftBarButtonItem = self.editButtonItem;
    return self;
    - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
    [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationLeft];
    - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
    return YES;
    - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
    NSDictionary *currentName =[[[boyNameChoices objectAtIndex:fromIndexPath.row] retain] autorelease];
    [boyNameChoices removeObjectAtIndex:fromIndexPath.row];
    [boyNameChoices insertObject:currentName atIndex:toIndexPath.row];
    I can swipe left to right and get the red delete button on the right but not the circle and most importantly not the move icon on the right of the cell.

    Oops - I overlooked that. I just remembered the other half of what is needed. Since your view controller is a UIViewController and not a UITableViewController you need more plumbing to make the Edit/Done button work. The Edit/Done button is going to call your view controller's setEditing method, not the table's.
    You need to override the 'setEditing:(BOOL)editing' method in your view controller like this:
    - (void)setEditing:(BOOL)editing {
    [self setEditing:editing];
    [settingsTableView setEditing:editing];
    I also prefer to make configuration changes like adding the Edit button in the view controller's 'viewDidLoad' method instead of the 'init' method. It's safer because you know the nib is fully loaded and all your outlet's are setup.
    Of course the other option is to extend UITableViewController and let it do 90% of the work for you.

Maybe you are looking for