Can somebody help me with make Automation based on picking date from string and Uipath workflow can execute for that Particular strng?

I have like this file and i wanted workflow can pick this file name and processed on two date range as first on 15th of every month and second will be 30th of every month.
“Acquisition_Admin_Payee_Jun2024”
How can i make this so workflow can catch this file and processed some further processing.

@Arshad_Iqubal1

1. Sequence
    a. Assign
        - To: currentDate
        - Value: Now

    b. Assign
        - To: day
        - Value: currentDate.Day

    c. If (condition: day = 15 Or day = 30)
        Then:
            i. Assign
                - To: folderPath
                - Value: "C:\path\to\your\folder\"
            
            ii. Assign
                - To: filePattern
                - Value: "Acquisition_Admin_Payee_" & currentDate.ToString("MMMMyyyy") & ".xlsx"
            
            iii. Assign
                - To: filePath
                - Value: Directory.GetFiles(folderPath, filePattern).FirstOrDefault()
            
            iv. If (condition: Not String.IsNullOrEmpty(filePath))
                Then:
                    A. Log Message
                        - Message: "File found: " & filePath
                    
                    B. Excel Application Scope
                        - WorkbookPath: filePath
                        - Do: (Your Excel operations here)
                Else:
                    A. Log Message
                        - Message: "File not found."
        Else:
            i. Log Message
                - Message: "Today is not the 15th or 30th."

Hope this process will help you

1 Like

Thanks for your help i think i got the asnwer, @rlgandu

@Arshad_Iqubal1
Kindly Mark this as solution if it helps you