Snippet function to get the filename.