Amazon.com Widgets Unhiding Files using foundation tool
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2013, 08:26:46 PM
Home Help Search chat Login Register   
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+  Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+  Old Stuff
| |-+  Help!!!
| | |-+  Unhiding Files using foundation tool
Pages: [1]   Go Down
Print
Author Topic: Unhiding Files using foundation tool  (Read 394 times)
Shawn R.
Newbie
*
Posts: 3






« on: November 01, 2009, 06:18:36 PM »

I know I can do this using applscript, but what I would like to do is create a small application that will run the following commands in order to unhide files:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

Question: Can someone point me in the right direction in order to be able to send these commands to terminal? I looked up NSTask but apparently you can only use it once.

Thanks for the help.
Logged
skochan
Administrator
Hero Member
*****
Posts: 3106







« Reply #1 on: November 01, 2009, 06:27:10 PM »

Try the Unix library  "system"  call:

Code: (Objective-C)
system ("defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder");

Cheers,

Steve Kochan
Logged
Shawn R.
Newbie
*
Posts: 3






« Reply #2 on: November 01, 2009, 06:38:17 PM »

Well thank you, I thought it was going to be much more complicated.  Smiley

--
Shawn
Logged
Pages: [1]   Go Up
Print
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.