How do I change or remove default apps for a given file extension (in Terminal?) without munging date modified on all my old files?

When a program is installed, it seems to be able to do it (sometimes inappropriately if it hijacks file associations without asking) so why can't I?  This is for 10.4.
Specifically:
1. Since installing an HP wireless printer, HP not only tries to install a bunch of sales-ware on your machine that you have to carefully opt out of (annoying, but not a problem if forewarned), it changes the default file association for a number of basic file types, listing all sort of existing files as HP printer files. Using Get Info to change the default file type association globally causes it to mark ALL the files of that type as newly updated, munging the file metdata (which HP did NOT do). Most of the stuff on our computer is sorted by last modified, so if there is a way to fix this in Terminal (to simply fix or remove the HP default tag) without changing the date the file was modified, it would help. Note that uninstalling the program that created the default would do this, but I obviously can't do that (and reinstalling HP would have the same effect). So there has to be another way, right?
2. Since updating iTunes to v.9 a while back, every mp3 is marked as an iTunes file even though iTunes has NO multiple library capability without a wonky reboot using the option key, meaning that if I click on an mp3 downloaded since last update of iTunes, it opens automatically in iTunes and gets added to the SOLE itunes library without asking. (There is no way to toggle between multiple libraries or archive media in separate folders; iPhoto has a similar problem. (Has this been fixed in the latest version of iTunes?) In comparison, Quicktime starts up immediately and does not attempt to create a playlist just because you opened a file and listened to it.
(The iTunes playlists are simply subfolders of the single main library -- and you can't create a new library without doing a wonky procedure by clicking option during startup and telling iTunes to forget where its library is located (includin everything in it) and look up an entirely separate one by hand. So any mp3 file downloaded recently is uploaded to iTunes if you click on it. This wouldn't be problem if it didn't automatically add it to the sole iTunes library just because you clicked on it.)
Besides, all my old mp3s are Quicktime files and they are all archived by date modified. To its credit, ITunes, unlike HP, does NOT hijack older files already on disk and remark them as iTunes files. It only marks newly downloaded files as such.  But if I try and change file association for FUTURE mp3 files using Get Info > "use this program for all files of this type", it munges the file metadata (date modified) for all existing files!
Note that in HP case, it apparently does it at the file exchange preference level (or whatever it's called) since the OS then recognizes every file of those types as an HP file. In the iTunes case, it only does it if you download a new media file or open an existing file in iTunes, but again without changing the date it was last edited.
Since these programs are able to change the default file association without changing the date the file was last edited, it should be reversible in Terminal, correct?  Why does it change "date modified" when you try and correct metadata using Get Info (or sometimes just by clicking an enclosing folder?) Date modified should be a record of when a file itself was edited, not when it was renamed, or other metadata. Otherwise stuff can't be sorted correctly.

The unix commands you need are:
GetFileInfo
SetFileInfo
and maybe find
for cryptic details use the man command
Macintosh-HD -> Applications -> Utilities -> Terminal
man SetFileInfo
You may use the SetFileInfo command to set the file type & the program which will open the file.
# This little gem will do a get info on all files in a directory.
mac $ ls  | xargs -I {} GetFileInfo "{}"
file: "/Users/mac/playdoc/oddadocodd"
type: ""
creator: ""
attributes: avbstclinmedz
created: 05/01/2011 14:53:22
modified: 05/01/2011 14:53:22
file: "/Users/mac/playdoc/one.docx"
type: ""
creator: ""
attributes: avbstclinmedz
created: 05/01/2011 13:57:48
modified: 05/01/2011 13:57:48
file: "/Users/mac/playdoc/oneLineFile"
type: "TEXT"
creator: "!Rch"
attributes: avbstclinmedz
created: 05/07/2011 14:27:17
modified: 05/07/2011 14:27:17
file: "/Users/mac/playdoc/oneLineFile.txt"
type: "TEXT"
creator: "!Rch"
attributes: avbstclinmedz
created: 05/07/2011 14:27:49
modified: 05/07/2011 14:27:49
file: "/Users/mac/playdoc/three.docx"
type: ""
creator: ""
attributes: avbstclinmedz
created: 05/01/2011 13:58:03
modified: 05/01/2011 13:58:03
file: "/Users/mac/playdoc/two.docx"
type: ""
creator: ""
attributes: avbstclinmedz
created: 05/01/2011 13:57:56
modified: 05/01/2011 13:57:56
file: "/Users/mac/playdoc/weirder.doc.docx"
type: ""
creator: ""
attributes: avbstclinmedz
created: 05/01/2011 14:50:03
modified: 05/01/2011 14:50:03
# well, ! is a funnie character so we escape it.
mac $ SetFile -t TEXT -c \!Rch two.docx
mac $ GetFileInfo two.docx
file: "/Users/mac/playdoc/two.docx"
type: "TEXT"
creator: "!Rch"
attributes: avbstclinmedz
created: 05/01/2011 13:57:56
modified: 05/01/2011 13:57:56
mac $
mac $ date
Sat May  7 14:40:56 EDT 2011
mac $

Similar Messages

  • How do I change the default app for opening a file;

    If I right click on a file in finder, it tells me what the default app for opening the file is.  it also gives me a short list of other apps.
    I would like to change the defaults for several file types, and also delete one app from the short list and add a different one.
    How do I do this?
    thanks

    You could try this:
    - right-click (tap with 2 fingers on the apple trackpad) on a file you want to open in openoffice
    - move the cursor over "open with". You should see the default app, then some suggestions, then app store, then at the end, "other...".  Select "other..."
    - find openoffice in your applications folder and select it  (if it is dimmed, change "enable: " from "recommended applications" to "all applications", then you can select "openoffice")
    - check "always open with"
    - then, click "open".  The file will open in openoffice and from now on, openoffice will be the default application to open the type of file you just opened.  You should also see the icon of all files of the same type change to the openoffice file icon.
    This is supposed to work, but that's not always the case, especially when the default app happens to be an Apple app.  If you don't want to use that Apple app, delete it (or move it elsewhere if you want a backup). That can help.
    Good luck!

  • How do I make Pages my default program for opening doc files

    Currently TextEdit is the default program to open doc files that I download from emails. Now that I've installed iWork 08 I would like Pages to be the default program. Thanks!

    Right-click any .DOC file and select Get Info. Then choose Pages as the open with application and select "Change For All. Pages is now your default app for .DOCs.

  • How can I set a new default app for .flac

    10.6.8
    This doesn't work:
    To change the application that opens a document:
    Select the document and choose File > Get Info.
    Click the triangle next to “Open with” to expand the section.
    Choose an application from the pop-up menu, or choose Other to locate a different application.
    If  you want to use that application to open all documents of the same type  as the current document and created by the same application, click  Change All.
    There is no "open with" section in "Get Info"
    I  have seen an open with dialog when clicking a file but it's not now  happening. One app (Wave pad--- trial)was selected, trash that app and  another (Audacity) is now default. I was never asked. I can change one  at a time in Get Info (Select New Original) but can't find a Change All option.
    Any ideas?

    If you do a Get Info (Control click and choose get info), you do not get a window like this with the choices I've circled?

  • Change default app for excel files

    Is there a way to change the default app for viewing Excel files sent as email attachments on iphones and ipads? Currently if you tap the file it opens in Quick Look, tap and hold gives other options to open the file. I want to set the tap affect to open the file in numbers instead.

    Any email attachment should give you the option of opening it in any app that can at a minimum view the file. In the File function (i.e. by tapping the "box with an arrow" icon), then swiping to the left and tapping "More", you can turn off a handful of apps from appearing, but also change the order in which they appear on the pop up making your app of choice a little quicker to access. Also, if you tap and hold on the attachment icon in the message, it opens the same functionality with going through the quick look.

  • Make Word default app for .doc files

    How can I make Word the default app for .doc files? I don't want Pages to launch when I clip on a word doc attachment in an email using Entourage.

    I notice you say you're having this problem when you open a document attached to an e-mail within Entourage, correct? If so, this may not be an Apple issue. Check Entourage's settings to see if it has an option that specifies what application opens.
    Also, do these files have an extension? If not, that could be causing problems. If there's also no extension, the Mac could get confused, and it may not have any basis for allowing you to Change All. (Change all what?) I could not duplicate this behavior by e-mailing myself a file with no extension, but if a Windows machine were involved, that might change... or maybe not.

  • OS X doesn't remember the default app to open a file with [delete the thread]

    Alright, so I have installed ACDSee and I want this app to be a default app the image files should be opened with.
    However, OS X keeps reverting back to the system's "preview app".
    Yes, I obviously ticked the "always open with" box, but it won't remember it. And at preferences (security & privacy) I allowed any app from the internet.
    Is there a system file that I'd edit with a text editor and manually set up a default app for a certain file extension?
    nevermind, rebooted the OS, and now everything works fine.

    Is there a way to change the default program to open a file with another program using a Rededit key. I would like to change the program to open a .g3pp file with vlc instead of media player cause it doesn't read
    it.
    Why make life hard for yourself? Just right-click any .g3pp-file, then left-click "Open with". That's all!

  • Three Numbers questions:how do you change the auto default background or fill color from white to another color to use in multiple succeeding operations?  what is the formula to express the ratio of two numbers as a percent?

    Numbers questioons:
    -how do I change the automatic default background fill color so it stays a non white color?
    -what is the formula to express the ratio of two numbers as a percentage?
    -how do I create a signal formula to be sue against an entire column of data (for example, if I wanted to multiply the each cell in the column by the number 10)?
    -I have created a spreadsheet in Numbers with header and rows labelled and it contains formulas as well.  I now want to create a new 'blank' of this template with same header and row names and formulas, but without the cell entries from my earlier exerciser so I can use again in the future. How do I do this?

    Hi Matt,
    For short columns, the easiest method is to select the cell containing the formula, then grab the fill handle (small circle at the botom right of the selected cell) and drag down.
    For long columns, use either Jerry's suggestion (copy/paste) or Insert > Fill > Fill Down.
    Copy/Paste:
    Select the cell containing the formula. Copy
    Select from the cell containing teh formula to the end of the column. Paste.
    Fill Down:
    After entering the formula, and pressing enter...
    Click on the column reference tab to select the whole column.
    Command click on each cell above the one containing the formula to remove it from the selection.
    When cell with the formula is the top cell in the selection, go Insert > Fill > Fill Down.
    Pick whichever is easiest.
    Regards,
    Barry

  • Pdf on Windows 8;How do I get adobe to be the default app for pdf files.

    I installed pdf reader on my windows 8 laptop, but windows only opens with its "TWINUI". In its "other" option acrobat reader doesn't appear. It also doesn't appear on the windows desktop.
    How do I get adobe to be the default app for pdf files.

    http://winsupersite.com/article/windows8/windows-8-tip-change-file-associations-144102

  • How to make Pages default app for .doc files

    How do you make Pages/Numbers the default app for all .doc/.xls files?

    Welcome to Apple Discussions
    Highlight a known Word document in the Finder, highlight it & choose Get Info from the File menu. In the Get Info box, click the triangle next to "Open With." Click on this drop-down menu & choose Pages. If Pages is not a choice, choose "Other" & navigate to the Pages application. Now click the "Change" button under the text that asks if you want to open all documents like this with Pages. Repeat with Excel documents & Numbers.
    Be aware that the icons for these documents will be plain white icons.

  • How can I change my Editor default back to Elements 8? (changed when I loaded trial Elements 11.)

    How can I change my Editor default back to Elements 8?   When I downloaded a trial version of Elements 11, my default changed to version 11.  I use Adobe Lightroom, and when I switch over to Elements using "Edit In", it automatically open Elements 11 now.

      In Lightroom Library prefs link to the PSE8 editor app, usually found on the Mac in support files. This example is for PSE10.

  • How do I change size of default fonts on OS X 10.9.4?

    How do I change size of default fonts on OS X 10.9.4?

    CS4 does run on Mavericks. The 150:30 error means licensing broke.
    Two ways to fix this: If you are used to the Terminal app, you download the license recovery package and following instructions carefully, you use the python script in the package.  Error "Licensing has stopped working"  | Mac OS
    I've done this and it works.
    If for some reason it doesn't, reinstall CS4 from your discs, or download the CS4 installer here.
    http://helpx.adobe.com/creative-suite/kb/cs4-product-downloads.html
    Have your serial number ready.
    Gene

  • Change default app for .dvdmedia files (Finder now treats them as folders)

    I need to change .dvdmedia files to open up with an app and not to show up in Finder as a folder as it currently does. How do I do that?
    There isn't anymore the usual drop-down menu for Open with... in Get Info dialog window since Finder now treats .dvdmedia files as folders. This happened when I was trying to change the default app for them to something else but the "Open with" section kept showing Finder and when I actually selected the Finder once it started to treat these files as folders. Now I don't know how to get back.
    Thanks!

    This tip further down the other discussion worked (the 2. part of it): https://discussions.apple.com/message/17531236#17531236
    I'm still missing icons for three of my .dvdmedia files and I can only have DVD Player app be the default app but at least I got the files back to files instead of folders.
    kudos to ggmt827 via Chad Leeper at this Macrumors thread
    http://forums.macrumors.com/showthread.php?t=866006
    "1. Open TextEdit (or some text editor), create a small text file and save it.
    2. Right-click on the text file, and choose "Get Info".
    3. Under Name & Extension, change the extension to ".dvdmedia". Hit Enter to save this change.
    4. Under Open With, the associated program should be showing VLC. Select DVD Player instead, and save that change.2

  • How can I remove default alarm for events in iCal on devices ios?

    Whenever I add an event to my iCal calendar in Mounain Lion it will automatically add one default alert only on my iphone and ipad. These default alarms are not displayed on my macbook or icloud.com
    Default alarms are disabled in macbook, icloud.com, and my ios devices.
    How can I remove default alarm for events in iCal on devices ios?
    Thanks and sorry for my english.
    MacBook Pro, Mac OS X 10.8

    OK, so I have had this issue for the past several months. I think it all started when I upgraded to ML from SL and migrated my calendars and contacts to iCloud. That was a couple months ago. But now I am running 10.8.2, and about two weeks ago I upgraded my iOS devices to 6.0.1.
    I don't seem to be having any issues with events that I create now, but all those old events that were migrated to iCloud a couple months ago, many of those sound alerts on the iOS devices even though there was no alert defined when the event was originally created. I have always had alerts off by default both in iCal and on the iOS devices.
    So here's the question: is there a way to go through and disable all these spurious event alerts? I've been disabling them as the event reminders come up, but it's irritating. It would be nice if there was a way to turn them off all in one shot somehow.

  • I changed my Apple ID on iTunes and on the iPhone 4. When I try to "Update All" the old Apple ID (I no longer have access to the email address) shows up. How do I update those apps?

    I changed my Apple ID on iTunes and on the iPhone 4. When I try to "Update All" the old Apple ID shows up (I no longer have access to that email address). How do I update those apps?

    Apps are DRM protected and tied to the account used to originally obtain them. They cannot be transferred to another iTunes account nor updated using another iTunes account. Only the account used to obtain them can be used to update them. You can contact iTunes support, explain the situation & ask that they add these apps to the download queue of your new account:
    http://www.apple.com/support/itunes/contact.html

Maybe you are looking for

  • Home Network, unable to see computers

    Hi Guys, i love all the support out there and i have been searching threads but unable to find a fix, thus far I have at home: 1 Macbook 1 Macbook Pro 1 iMac All have access to the internet via "airport" and we can view web etc with no issues. We wan

  • How to configure third party outlook in outlook

    Dear Experts, I am trying to integrate Outlook into my portal. ihave been through many of the documents and they refer to url as below: http://<server_hostname>:<port>/Exchange/<User.UserID>/Calendar/?cmd=contents but my client is using third party O

  • ORA-12505, error when i tried to open the "Workflow Administrator" tool

    i have installed Oracle content server 10g r3, but when i tried to open the "Workflow Administrator" tool i got the following error "ORA-12505, TNS: listener does not currently know of SID given in connect descriptor", so how can i solve this issue?

  • How do I get to my iphoto albums to use as screensaver in OS X 10.8?

    How do I get to my iphoto albums to use as screensaver in OS X 10.8? As it is, I am limited to the pre-seloected screensavers (National geographic, etc.).  When I get to the field for "Folder" and select "Pictures", the iPhoto Library is there, but i

  • Deploying bpel processes through ant

    Hi all I have to deploy bpel through ant for this I am following below steps. 1) SET ANT_HOME to C:\jdev\ant 2) copied the followong jar files into ant home library orabpel.jar,orabpel-ant.jar, orabpel-boot.jar, orabpel-boot.jar,orabpel-exts.jar,orab