code to find a file in linux code to find a file in linux wezel (Computer) (OP) 2 Oct 02 23:18 i need to write some code to find a given executable file and run it but i'm not sure how to to go about it RE: code to find a file in linux LyMc (Computer) 10 Nov 02 05:07 The code depends, of course, on your platform O/S. On UNIX, you can take advantage of the system *find* command to search for a wildcard-spec filename. On Windows, you could use the DOS find command, but it can't take wild cards (and is incredibly klunky to boot). Your best bet there is to roll your own in DOS or Windows using the findfile and nextfile system calls (or the MFC/Delphi equivalents) to walk a directory, and then apply that recursively to walk the directory trees. On DOS/Windows you'll also need code to find the disk partitions so you can traverse that list as well.