Possible Duplicate:
Getting Filename from file descriptor in C
How get fileName having FILE*?
Is there any way where I can find the file_name from a file-pointer in C?
fp = fopen(file,"r");
From fp, is it possible to get the file name which I have opened?