Hello UiPath Community,
I’m relatively new to UiPath and I’m trying to create an automation workflow to delete all files from a specific folder. I’ve followed the steps outlined in the UiPath documentation and other resources, but I’m encountering an issue with the “Delete File” activity.
Here’s a summary of what I’ve done so far:
- I’ve used an “Assign” activity to assign the folder path to a variable (folderPath).
- I’ve used a “For Each” activity to iterate through each file in the folder.
- Inside the “For Each” loop, I’ve used another “Assign” activity to assign the list of files in the folder to a variable (filesList) using the expression Directory.GetFiles(folderPath).
- I’m attempting to use the “Delete File” activity inside the “For Each” loop to delete each file, using the file variable as the file path.
However, I’m encountering the following error message: “Value cannot be null. (Parameter ‘path’)”.
Could you please assist me in troubleshooting this issue? Is there a better approach to achieve my goal of deleting all files from a specific folder using UiPath?
Thank you in advance for your help!