Permission denied problem

Joined
Sep 16, 2008
Messages
5
Reaction score
0
Points
1
hi,

I am working in Carbon C application (Mac OS 10.4.7)

I want to open a pdf file which is placed in the desktop using System command.

My code is

system("/Users/laserwords/Desktop/test1.pdf");

The output is permission denied

What can i do to rectify this?

Thanks in advance....
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
It appears to me that you are trying to execute the above line instead of reading it. I believe you need to include the application you want to open the test1.pdf file with.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top