Link to home
Start Free TrialLog in
Avatar of razvanl
razvanl

asked on

Searching for a file

Hi,

I'm making a C++ program and I need to search for a file in several directories.  Now we can assume I have a list of directories in an array and I know what file I'm looking for (that would be nice).  Now, I need to know which directory -- if any -- the file is in.  I'd appreciate any help.

Sincerely,
Razvan L.
ASKER CERTIFIED SOLUTION
Avatar of newmang
newmang

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of razvanl
razvanl

ASKER

Hi,

Thanks for the answer.  I've already found a way to do it via the opendir() and readdir() functions  but I'm always happy to find another way of doing it.  I'm not sure which is better -- I do have to go through all the files with readdir() to find the one I want.. still it does work.

Sincerely,
Razvan L.