>i need my script to use all files in a directory
You can search a directory with opendir and readdir and closedir. Check your man pages for details.
>but now can i do this
You need to build the path string manually:
char user_path[] = "user_path";
char filename[] = "some_file";
char full_path[BUFSIZ];
sprintf ( full_path, "%s/%s.htm", user_path, filename );
fp = fopen ( full_path, "r" );
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004