I want to monitor a folder where excel file is being created everytimes the bot run successfully, and as soon as the excel file is created on the folder i want to execute macros on it. But I am not getting the activites in UiPath studio to monitor the folder, I have installed the system.activities packages. There are many activities that is unavailable in UiPath studio like read csv classic one, etc.
You can write a code for this like use While loop to check if there is any file in the folder.
This expression will give you true if there is a file available.
Directory.GetFiles("C:\YourFolderPath").Count > 0
Install the package UIAutomation.Activities
Have the successful job that creates the excel file create a queue item, then set a queue item trigger to start the macro job
Try event Triggers from UIapth orchestrator
You can use event triggers i.e File Change Trigger activity to do this.
Or monitor a folder using directory.get files method.. see if count greater than 0. Then accordingly apply your macros
Hi @Keshav_Choudhari
Try below
- Use File Trigger activity and give the folder path.
You can use file filter with wildcard like*.xlsxor specific file name
- in Properties, select Created option under Change Type
(you can select other options also if required)
- The workflow will wait at the File Trigger activity and will continue only when a new file is created in that folder.
UiPath doesn’t have a direct “watch folder” activity. You can either use a loop with Directory.GetFiles and a delay to check for new files, or use File System Watcher via Invoke Code.
If activities like Read CSV Classic are missing, make sure UiPath.Excel.Activities and System.Activities are installed, and switch the project to Classic experience if needed.
Once the file is detected, use Excel Application Scope → Execute Macro to run the macros.

