Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-25-2006, 05:25 AM   #1
Registered User
Join Date: Mar 2006
Posts: 2
Default Help with fopen a script(a filename.sh file)

Good morning!

I have a problem with open a script file.
I have a directory named hello and it consists of 1 file jobs.sh.
I do :

if((dirp = opendir(/home/user/hello))) { //open the directory

while((dp = readdir(dirp))) {
if( (fptr = fopen("dp->d_name","r")) != NULL) {
printf("File opened\n");

} else {

printf("File couldn't be opened\n");



The pink printf outputs :

Also,jobs.sh doesn't open,but why?

File couldn't be opened
File couldn't be opened
File couldn't be opened

My problem is that the file jobs.sh shall open in order to read it.

Thanks,in advance!
G_P_H_M is offline   Reply With Quote
Old 03-26-2006, 03:52 PM   #2
goliatone's Avatar
Join Date: May 2003
Location: barcelona
Posts: 1,118

what is that extension you are traying to open?! .sh?
goliatone is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to open pdf file from projector file in acrobat reader sohailfx ActionScript 2.0 2 06-24-2005 05:54 PM
Changing Font color/size for an XML file displayed in a browser andrewf Other Flash General Questions 2 09-27-2004 05:10 PM
using variables in external text file while running *.exe dartagnan324 Projectors and CDs 1 08-07-2003 04:14 AM
Works in .swf file but not in projector!! Flasher ActionScript 1.0 (and below) 1 04-02-2002 05:05 AM

All times are GMT. The time now is 10:25 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.