tags:

views:

56

answers:

1

Suppose I have a file path as C:\Sample\example.txt.

how can full path of the file be retrieved (the file can be in any directory) just by giving the filename i.e., example.txt in C ?

A: 

get the source for the "find" command from the (i think) gnu package (or a linux source distribution), and copy the appropriate passages for you platform.

Peter Miehle
Keep in mind that GNU find is GPL-licensed.
Tadeusz A. Kadłubowski