Try fgetattrlist to get the filename from the file descriptor. > Thank you. > This is not what my question is about. > > I'm asking *which* filehandle should be used. > "cur_file" does not work - see first email. Then input_stack[base_ptr] might be the file handle you are looking for? Greetings,Wolfgang