Need of some help


I am building my first automation and i have face some challenges but found ways to corp with them or solve them but i am stack on this error and i have tried my best to solve it but still can not find a way to solve it. can i get some help on how to fix this error.

@Lewis_Nyatta

As per the error message, bot don’t find the folderpath.
Check your folderpath again or browse by clicking on this browse button.

Also, it’s bad practice to use the hardcoded full folderpath. This will break when you deploy this to another machine/production.

You can make it dynamic by using Get Environment Folder activity.

Hi @Lewis_Nyatta

Please check if this path exists:

C:\Users\nyatt\OneDrive\Documents\UiPath\Excel Report Consolidation\Daily Reports

If the folder is in a different location, update the path in For Each File in Folder. Also make sure OneDrive is synced.

Hi @Lewis_Nyatta ,
You can try these steps:

  1. Go to the folder path shown in the error.
  2. Verify that Daily Reports actually exists.
  3. If the folder was moved, renamed, or deleted, update the folder path in your workflow.
  4. If you’re using OneDrive, make sure the folder is fully synchronized and available locally (not cloud-only).
  5. Add an If Directory.Exists(folderPath) check before the For Each File in Folder activity to avoid runtime failures.

Thanks


Mine does not have the browse folder button as you can see

@Lewis_Nyatta

Update your system package to latest possible version and you should be able to browse the folder.

Hi @Lewis_Nyatta,

Welcome to UiPath! :blush:

The error message shows that UiPath cannot find the folder:

C:\Users\nyatt\OneDrive\Documents\UiPath\Excel Report Consolidation\Daily Reports

Please check whether this folder actually exists at that location. It looks like the For Each Excel File in Folder activity is using a path that cannot be found.

You can either create the folder or update the folder path in the activity to the correct location.

Also, since your files are under OneDrive, please make sure the folder is synced and available locally.

You can use Directory.Exists("YourFolderPath") before the loop to verify whether the folder exists.

Hope this helps!