Here, file name 30-Apr-23. But when file name 01-May-23 then I have to change folder path. Please kindly give some idea then I will no need to change folder path every time.
Hello,
If process start date and the date in the file name are the same you can use it like below;
“C:\YourCompName\Desktop\mail\Ready for Payment-”+DateTime.Now.ToString(“dd-MMMM-yy”)+“.xlsx”
If not let us know what is the rule between run time and file date.
Regards