Programatically change which opens a file type

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Programatically change which opens a file type
# 1  
Old 08-13-2009
Question Programatically change which opens a file type

Hi there,

If we have 2 apps on our customers machines that can both open files of a certain file extension, is there any way via shell commands to set which application should be the default?

Essentially, I'm hoping to replicate Get Info > Open With > Change All, but using a script.

Thanks in advance!
Dave
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SSH Programatically

Hi Experts, Need some help. I am trying below code programatically to login to ssh ip from a csv file. the below code logging into all servers and executing some command line syntax. But what I need is for example if i have 5 IP's ,if first one connects successfully and executes the... (3 Replies)
Discussion started by: onenessboy
3 Replies

2. Red Hat

Can I change the partition type with fdisk without disrupting data?

Hello, I have been going through our environment and I see we have a few servers with LVM's setup and the file system type is still set to "83" within fdisk. If I change this to "8e", will it hurt the data or cause any loss? I need to know for sure before I make the change. (1 Reply)
Discussion started by: s ladd
1 Replies

3. UNIX for Advanced & Expert Users

sendmails works, but opens 43 file handles per email -> problem

I'm using Sendmail 8.13.8 on a CentOS 5.5 vServer (Virtuozzo). I'm using a loop in PHP to send a lot of HTML-mails via sendmail. Each mail is a mail with individual statistics for our users, so its not mass mailing, bcc is not an option. It all works fine, but when I take a closer look there... (2 Replies)
Discussion started by: ZX81
2 Replies

4. Shell Programming and Scripting

Position to last line when vi opens a file.

Any Idea without entering any keystroke I can go to end of line in vi when I opening the file. When I am opening Vi I want to goto last line. when I give vi + filename it does not work. Any clue why it does not work. Thanks. (3 Replies)
Discussion started by: ekb
3 Replies

5. UNIX for Dummies Questions & Answers

Selectionbox, script which opens more than one file at once?

hello everybody I´m very new at shell and programming :eek: and i have the following question/problem: I need a script for framemaker (based on shell) which opens a new document from a template (.fm). Then imports a .doc file and then save it as a .mif. Actually my script works with one... (3 Replies)
Discussion started by: tio86
3 Replies

6. Shell Programming and Scripting

change file type to hidden using chmod command

I want to make a hidden file with chmod command. Example: I have a file name inputfile.txt -rw-r--r-- 1 xxxxxx xxxxxx 1388 Sep 12 05:41 inputfile.txt I want to hide that file using chmod command. Please tell me if it is possible or there is some other way to do this. Thanks... (2 Replies)
Discussion started by: rinku
2 Replies

7. Shell Programming and Scripting

change the contraints type of fields in database

how to disable the contraint type of a field (which is present in diffrent tables ) in database using a single unix script file. (4 Replies)
Discussion started by: shaksing
4 Replies

8. Programming

Add IpAddress Through Programatically

Hi all, Can u give me some suggestions how to add Ip Address through Programmatically , Actually I done it in Windows But now I want same thing in Unix................................ Can Any body Help to me....... (6 Replies)
Discussion started by: ykmraju
6 Replies
Login or Register to Ask a Question
GOPEN(1)						       GNUstep System Manual							  GOPEN(1)

NAME
gopen - open files SYNOPSIS
gopen [-a application] [-o] [-p] [-NXHost hostname] [filename] DESCRIPTION
The gopen command allows you open a file (or directory) as if you had double clicked the object's icon. It is possible to specify one or more filenames which are interpreted relative to the current working directory. By default, gopen will open filename with the application currently assigned to the file's extension. But by specifing the -a flag on the command line you can tell gopen to open the file with another application. You can also directly print a file without ( -p ) or with ( -p -o ) opening it. As with most other GNUstep software, it is easily possible to attach the process to a remote window server using the -NXHost flag. OPTIONS
-a application use application to open filename -o open filename (may be used in conjunction with -p ). -p print filename instead of opening. -NXHost hostname attach to remote window server on hostname EXAMPLES
Open all files with a .txt extension in the current directory: gopen *.txt To open a source file in CodeEditor (instead of the current default application), type: gopen -a CodeEditor MySourceFile.m To print the .plan file in your home folder, use the -p flag: gopen -p ~/.plan BUGS
Using the -a application argument, gopen allows you to open any kind of file with any application you want. This does, however, not work with applications employing the NSDocument architecture as they will only receive filenames whose types the application has registered. To circumvent this limitation, applications may advertise their ability to open all kinds of files through the "*" filetype. When gopen is used with only the -a application argument but no filename present, the application is simply launched without opening a specific file. SEE ALSO
GNUstep(7), openapp(1) HISTORY
gopen was written November 2001. This manual page was first written July 2003. AUTHORS
gopen was written by Gregory Casamento <greg_casamento@yahoo.com>. This man page was written by Martin Brecher <martin@mb-itconsulting.com>. GNUstep August 2003 GOPEN(1)