Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 11, 2008, 10:47 AM   #1
swimlikehell
macrumors member
 
Join Date: Aug 2006
How to find if a specific application exists at a given path

Hello,

I am trying to find one of two things, either given a path find if a application exists at that path. Or If I can search an entire comp for an application and retrieve its path. If any one has any suggestions on either of these it would be much appreciated.
swimlikehell is offline   0 Reply With Quote
Old Apr 11, 2008, 02:08 PM   #2
psingh01
macrumors 65816
 
Join Date: Apr 2004
Quote:
Originally Posted by swimlikehell View Post
Hello,

I am trying to find one of two things, either given a path find if a application exists at that path. Or If I can search an entire comp for an application and retrieve its path. If any one has any suggestions on either of these it would be much appreciated.
Using an sh shell script you can do something like:

Code:
#!/bin/sh

if [ -f "/my/lost/app" ]
then
    echo "found it! :)"
else
    echo "didn't find it :("
fi
The if statement just tests to see if the file specified exists. You can also look at the find command. http://unixhelp.ed.ac.uk/CGI/man-cgi?find
psingh01 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Google: application specific password badman89 OS X Mavericks (10.9) 6 Apr 26, 2014 08:39 AM
Application specific keyboard shortcuts? senseless OS X 10.8 Mountain Lion 5 Dec 4, 2012 04:19 PM
Find iWork Pages path mctavish Mac Applications and Mac App Store 2 Nov 10, 2012 12:43 AM
Application specific volume control APP TWR Motorsport MacBook Pro 0 Jul 15, 2012 09:26 PM
How to find and edit the PATH file V6Pony Mac Programming 3 Jun 17, 2012 10:38 AM

Forum Jump

All times are GMT -5. The time now is 04:44 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC