can anyone tell how to pass pathname as an argument to file name?