Getting Filename attchments error

Cool, Hope you understood the logic. If not please let me know. Thanks