Temporarily changing the "open with" app for a batch of files

I've written a number of scripts which have been saved as application bundles. One of the resource folders (named "Image Files") contains all the image files used in the script -- but the image files may have a variety of default applications for opening.
I'm working on a separate script to facilitate editing the application bundles if and as necessary, and editing the image files is part of that. I need the option of opening the image files with an application other than the file's default application -- for example, I might want to open the image files with Photoshop.
In my editing script I can easily enough get a list of the image files. But to open them with, say, Photoshop, I find that I have to use a Photoshop tell block and the full path to each file as it is called (otherwise it opens with its default application). If there are hundreds of image files, that's a lot of work!
I'm seeking a "global" command that will tell all files in folder "Image Files" to open with app "Photoshop" (just in this script, as I don't want to change the defaults).
Possible?

I probably didn't explain my requirements thoroughly
Your suggestion:
"You mean like:
tell application "Finder"
open every file of folder "Macintosh HD:path:to:Image Files" using "Macintosh HD:Applications:PhotoShop.app"
end tell"
isn't quite it.
(For one thing, that has the somewhat alarming result of opening all the image files in the folder simultaneously, and there may be hundreds.)
In plain English, what I had in mind was more like:
"Set the 'open with' application of every file in folder 'Macintosh HD:path:to:Image Files' to Adobe Photoshop.app"
such that, if I were to have those files in a list, and were to open them one at a time, they'd open with Photoshop without further instruction -- this without affecting the default applications (or 'open with' applications) of the files from which those files were duplicated (assuming that there are such 'original' files).
Since this still may be unclear, here's another explanation:
• Say I have ten .jpg files on the desktop, all set to 'open with' Preview.
• I duplicate those ten files to the Image Files folder of the application bundle.
• If I open any one of those files at the desktop, I want it to open in Preview.
• But if I open any one of those files in the Image Files folder, I want it to open in Photoshop. (The
files in the Image Files folder could each have its 'open with' application reset manually, but
with hundreds of files I'd much prefer AS to do that. As far as I can tell, doing that -- manually
or with AS -- would result in different 'open with' settings for a file on the desktop and the
corresponding file in the Image Files folder, which is basically what I'm after.
Can I get AS to do this?

Similar Messages

  • Need to reset the Open With application for finder folders

    So while making an Aperture Vault the app crashed and I got a corrupted vault on my drive which I could not delete. I was able to Get Info>Show Package Contents and delete some of the contents to make it take up less HD space. In the process of doing that to the vault, I accidentally changed the Open With option to Finder, and somehow the Change All button got clicked. So now ALL of my Aperture Vaults open with the Finder by default and appear as folders on my desktop. Folders do not have the "Open With" option, so now I can't change it back so that the Finder views the vaults as Aperture files, and not Finder folders.
    Anyone know how I can reset my "Open With" preferences?

    Can you right-click to "Get Info" on any file?
    The info window will allow you to change the "Open with" and "change all".
    I don't know the effect on File Vault on the option but if you can, try it.
    Deleting contents of an app bundle can create problems, unless you know exactly what you're deleting.
    -mj

  • How do you change the "open in" app list on iPad?

    Hello. Is there a way to change or assign which apps the iPad lists in the "Open In" feature for a file type?  I had to delete one of my notetaking apps before "Open In" would list "Stanza" as an option to open a PDF.
    Thank you for your time.
    akw

    I posted something similar and tested this out on my iphone.
    deleted ibooks app
    This expanded my "open in" apps list to greater than 10 apps ... I think it includes all the apps that can possibly open pdfs now.
    Inconvenient that ibooks has to be deleted to do this but its better than deleting several other paid apps randomly until the app you want appears in the list.
    i am wonderin if this will work the same on the ipad.

  • Problems changing the Open with... setting

    Hi,
    Having recived my new MacBook Pro with the trial version of Office 2004 I removed this using the remove utility as I have the full version of Office X.
    However, I get the error code -10660 when I try and open documents. I have tracked this down to the fact that the default Open with... setting is Word 2004 etc.
    I can manually select the correct program to open these files with, but when I set it so that all files with .doc open with this older version of Word it defaults back to the new version. (I am using the Change All... option under the Get Info option).
    If I manually do this using Open with.. for each file it works, but this is both time consuming and silly.
    iMac G5, MacBook Pro   Mac OS X (10.4.5)  

    Missed the post above. Running this at the terminal did fix the problem:
    /System/Library/Frameworks/ApplicationServices.framework/\
    Frameworks/LaunchServices.framework/Support/lsregister \
    -kill -r -domain local -domain system -domain user
    The question was, why should I have had to have done this!!

  • Why does the "open with" function often not recognize valid file extensions

    Sample situation: I often need to open JPGs downloaded from the Internet in Photoshop, but I need to keep the default program as Preview.
    When I attempt to open the image in PS using the "Open With" function (in the Edit menu), there are often no choices - it's blank, so I need to open it in preview and then save it as a PSD file to quickly open in PS. Other times I will get a list of other installed programs like Excel, and need to scroll down to the "open with another program" button, where I need to manually find the PS application. Of course, I can always open the file from within PS, but why is the Apple option so seemingly arbitrary from one similar file to the next?
    There is often no rhyme or reason for the programs it offers me.
    This happens with other file extensions, too.
    Is this a known bug?

    It's up to the applications to declare what types of files they can open. They do so by storing the information in the CFBundleDocumentTypes section of the Info.plist file in the application's .app directory. If you know what you are doing, you can edit the plist file to add your own file types/extensions. Unfortunately, I don't know of a good application to do that for you (but it's not a bad idea for one, if I get the time).

  • The "Open With" menu for PDF files has 19 apps listed to choose from.

    How do I modify the drop down menu for "Open With" to eliminate about 15 apps suggested for PDF files?

    I want to permanently shorten the list down to only a few apps to select from.

  • How do I change the "Open with" on iPad

    When I try to download some videos, a dialog pops up and gives me an application to select (usually iZip or DropBox), to open the file.
    Obviously neither app will open the video. How do I control which app to use to open files ?

    There was one reply that helped me change my Apple ID on my IPad but it wasn't very clear, so basically, go to 'settings' on the IPad; select 'store' on the left hand panel; sign out; select "use existing id" and put in the new 'Apple ID".  I think the problem I had was that by mentioning the Apps Store, I was trying to change the ID from the Apps Store, but I must admit, navigating and a combination of instructions helped a great deal, so thank you.

  • When I try to open a bookmark I get a box that says "what should firefox do with this file?" When I try to change the "open with Internet Explorer" I can't find firefox ? Last week this bookmark worked fine.

    When I open a bookmark a box pops up that says "What should firefox do with this file? "open with Internet Explorer? When I browse I can't find firefox to change to. Last week this book mark worked perfectly.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the ''Safe mode'' start window.
    You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")

  • Why does placing links in Illustrator now change the "Date Modified" data for all of my files?

    This seems to be a new glitch that started after I installed the latest updates to Illustrator CC (2014) and reoccurs every time on both computers I work on:
    When I choose to place a new image in my Illustrator file and the window opens to let me choose a file to place, the "Date Modified" field of all the files in the folder I'm viewing (except other Illustrator files) quickly changes to the current date and time. This is definitely happening when I'm in Illustrator because when I needed files from a folder that had hundreds of images in it and I was able to select a file quickly, I was able to do so before it had changed the date on all of my files. However, when I needed a file from a folder that had hundreds of images in it but I took a long time to find the image I needed, Illustrator had time to change the date modified on all of my files. This might seem like an unimportant issue because it doesn't actually seem to modify or damage any of my files, but having all of the dates change on my files is a serious problem for my workflow and file management issues. So far, my only work around has been to use back-up image files, but that's not a long term solution and I don't understand why Illustrator should be modifying the dates of my files.
    Is there a setting I can choose somewhere to prevent this problem? If not, is there somewhere I can report this kind of glitch? I'm not sure if I'm using the exact language necessary to get the issue across so please let me know if you have any questions! Thanks!

    iCloud is not compatible with Snow Leopard, that is your problem.
    A quick way out is to purchase Soho Organizer which is compatible, even when running on Snow Leopard, it will correctly handle Contacts and Calendars from iCloud. $100, 2 user license.
    Soho Organizer
    There is a free trial if you want to try it.

  • When using the "Open With" functionality to download an eml file, firefox is appending a *.txt extension to the filename. How can I prevent this from happening?

    If I save the file instead of open it, the file saves correctly (ie: without the added txt extension). If I attempt to open instead of save, the txt is added, resulting in the file opening as a text file instead of an eml file.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • How do I change the "Open with Windows Wordpad Application (default)" for a DOCX file to I guess, Microsoft Word?

    I think the "Wordpad Application (default) got entered some time ago while trying to open a DOCX file. I now have a compatibility pack downloaded for Word, Excel, and PowerPoint Formats for my Office 2003 and I think I could open a DOCX file now but can't get this Wordpad application removed and changed to another application to open it, which I think would probably be Word or if someone has another suggestion.

    I can't get "Use Microsoft Word (default)" to appear as an Action option. Only Windows WordPad application, Media Center, Internet Explorer, iTunes, Media Player Classic, Nero, Windows Photo, Picasa, Windows Calendar and wWindow Media Player appear as choices. I don't know how to add Microsoft Word as a choice. Maybe the second part of the instructions in your reply "Adding download actions" would solve this but I don't understand the instruction starting with #1. I don't know how to go about doing what it says to do.
    I don't think it makes any difference, but I do have Office XP instead of 03 as I stated in my first question.

  • Need to find a scripts for changing default "Open with" iTunes app to Quick

    Hello all...
    I'm new to scripting but need a script really quickly...
    I was wondering if anyone knew where I could find a script that will change the default "Open with" of audio files placed within a certain folder on my desktop...
    I'm making sound clips with WireTap and dumping them in a folder called WireTapExports as .mp3. I then need to play them without using iTunes (and importing them by default) but going into the "Get Info" and manualy changing the "Open With" settings for each file is taking ages...and it's very irratating...
    Is there a way I can make all audio file put in that folder automaticaly open with Quicktime instead.
    I know this is quite easy to most but I've only just started looking at Applescript (i.e. a few days ago) and but I need this to work now...
    Many thanks in advance...
    PigeonCake...

    Not what you want, but if you hold the control key while getting info it changes to summary info which then lets you change the preferred application on a batch of files in one go.

  • Unwanted Firefox entry in the Open With Windows Explorer menu

    Open Windows Explorer and right-click various file types. You'll see there's a submenu called "Open with" that allows you to choose a particular application. Firefox is listed for numerous file types it can't actually handle, like RAR and MKV.
    Does anyone know why? I've never attempted to open those file types with Firefox, though I did download such files with Firefox. I can't find any bug reports about this, and the above seems like too little information to file a report.
    I'm not the only one with this issue:
    * http://forums.mozillazine.org/viewtopic.php?f=38&t=2870531

    After cleaning the registry manually, I haven't been able to trigger this.
    * I now have RAR under Options → Applications again after downloading a file of that type. The respective file type doesn't have Firefox under the "Open with" menu in Windows Explorer.
    * I set Firefox as the default browser when installing. Then I set Internet Explorer as the default using the Control Panel, then Firefox again when prompted at startup. Since it's one of the few times Firefox interacts with the registry, I thought it might trigger the issue — it didn't.
    Since I can't recreate this, I think we can consider it a rare occurrence and forget about it. Thank you all for replying.
    ''the-edmeister wrote:''
    There's something screwed up in Firefox 31 and 32 with regards to Firefox messing with Windows OS File Associations […]
    Being Sunday, I'm too lazy to search for the relevant Bug report.
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=1049521 Bug 1049521] - Be less aggressive about non-primary file type associations in Firefox on Windows
    That's the bug report about Firefox inadvertently stealing the file association for PDFs. That didn't happen on my system. I also don't see how this could be related. The PDF association is set on install, and reinstalling Firefox didn't change the "Open with" list for the previously affected file types.
    Then again, the patch on bug 1049521 touches the ''OpenWithList'' registry keys, which is what I manually cleaned up. It also handles more than PDFs: I spotted media file types like OG? and WEBM, but not MKV or any of the previously affected file types on my system.
    ''FredMcD wrote:''
    Me thinks me smells a virus at work.
    The system is clean.

  • Get Info "Change All" button doesn't keep the proper "Open With" app

    I have a small but annoying problem that appears in Leopard 10.5.2 (been there since original 10.5.0 install) that I have tried to troubleshoot but can't solve.
    The problem is:
    -With some of my file types, the wrong "Open With" application is displayed when I view a Get Info for that file type. So to fix this, I open a Get Info window on one of those types of files, and choose the PROPER default application in the "Open With" slot. This works, and then the new proper application name now shows in that slot. So then I click the "Change All" button and apply to all files of that file type. I receive the warning that I will be changing ALL files of that type. I choose "continue" because that is what I desire.
    However, once I do that, (click Change All, then Continue button), the old, wrong application name jumps back the Open With slot! So the new, correct application choice doesn't "stick".
    Oddly enough, it sort of DOES work, because if I then re-click in the Open With slot, although the old, the wrong application is back listed again, if I look up above that name, then my actual desired application is listed in a list, and it has the word (Default) beside it.
    So if I do actually now double click any file of that type, then the proper application DOES launch and open the file.
    But why does the Get Info window still display the wrong, non-default application in Open With? And furthermore, this causes all file types of that kind, to display the WRONG icon in any Finder window. They of course display, the icon of what is in the Open With slot list.
    I am having this problem only with two file types and apps. (Cubase and Pro Tools---DAW audio apps). All of my Cubase files display a Pro Tools icon, and show as Open With: "Pro Tools" when of course it should display Open With: Cubase. As stated in the Open With list, Cubase is indeed there among other programs and it has the word (Default) beside it. So it sort of works when launching files. But I still cannot get Cubase to "stick" and stay in Open With after Change All!
    Can anyone offer any tips on what might cause this and what fix is needed?
    Thanks so much in advance!
    Wade

    Well, I tried rebuilding the Launch services with the command listed but still no luck. After having no luck with that and deleting caches, etc....I also, went to my home (user) directory and in Preferences, I deleted the com.apple.launchservices.plist file. I restarted and checked and still the same result.
    Also, I want to emphasize again that the file type I am discussing DOES actually launch with the correct application. (Cubase files in my example).
    But it is just annoying that ALL of my Cubase files display the Pro Tools application icon, and in Get Info they are listed to open with Pro Tools. But they actually do launch Cubase if double clicked.
    And one other VITAL note....if I open Get Info for one of these files, and change the Open With from Pro Tools to Cubase....then that choice DOES "stick" and retain. (if I "don't" also click Change All)
    It's only when I click "Change All" that it DOESN'T stick and the list selection jumps back to Pro Tools. I hope that may offer some clarity.
    Thanks for the tips but I am still back at square one.
    Wade

  • I have no "open with" option for downloads

    I click on a file within a website to open it, but the pop up box does not have the "open with.." option, only the save option. The file type is a text document with the extension ".prg" which is associated in my Windows Folder Options to open with Wordpad. Within Firefox Tools/Options/Applications, this file type does not show up, so I cannot change it. I read elsewhere where this is blamed on MIME type in the HTML header, but Microsoft Internet Explorer gets it right every time, only Firefox does not recognize the file type.
    As an aside, the same site has files with the extension".chg" that I open with Notepad. Firefox gives the "open with" option for these files, with Notepad as the defauld, but the "Always open with" is greyed out. Not that I care, as the default is what I want, but....

    Firefox goes by the mimetype and not the file type as IE does.
    http://kb.mozillazine.org/File_types_and_download_actions

Maybe you are looking for

  • Marketing attribute not assignable with language PL

    Hi *, I have detected a strange behaviour when maintaining "some/special" marketing attributes for BP in logon language PL. The affected attributes are configured as follows. Format                   No. Chars      Dec.Places      Meas. unit      Sin

  • 1020 There is no lock for ringer volume level, but...

    Earlier today I posted in this Community regarding the Subject issue. Received good reply and marked it as a Solution. Had additional thoughts so I'm doing this new Post. Same Subject as before. I had asked if it's possible to LOCK the ring volume, a

  • In need of help with a errormessage.

    h6. Hi people. I wonder if any of you could help me figure out what I have done wrong in my code. I have been trying to solve this problem for a very long time now, but without any success <img class="emoticon" src="images/emoticons/cry.gif" border="

  • Mountain Lion change color profile when use discrete video card

    MacBookPro mid 2010. Update Samsung SSD 830. Mountain Lion 10.8.2 just installed (new installation). Reset PRAM and SMC. Done. No result. Try with GfxCardStatus. No result. When the system uses the discrete video card changes the color profile. I'm n

  • ATG extending OOTB enumerated data type

    Hi All, If i have to add a extra payment group/option to an data-type="enumerated" in ATG repository, should we , 1) Use the OOTB table in our extended orderRepository.xml???? Coz ATG recomends to use auxiliary when extending the OOTB properties. 2)S