Thanks for your help everyone. I had a related question. It looks like readdir just return relative filenames and not absolute ones. Is there a way/method to return absolute filenames? For example, if I'm in /home/docs that has a text file (foo.txt) and I call readdir, I want to return /home/docs/foo.txt instead of just foo.txt. I could theoretically just append foo.txt to a "/home/docs/" prefix, but I'm trying to make my code more generic and not hard-code everything if possible. Thank you.
-Jose -----Original Message----- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:27 AM To: Torres, Jose; '[EMAIL PROTECTED]' Subject: RE: iterating over the contents of a directory check out opendir readdir and closedir. > -----Original Message----- > From: Torres, Jose [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 29, 2002 10:23 AM > To: '[EMAIL PROTECTED]' > Subject: iterating over the contents of a directory > > > Hi, > > How can I simply iterate over the contents of a directory? I > want to perform > a certain > action when I locate a particular text file. Thanks. > > > > -Jose > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]