How to get files in a folder in UiPath? I want to get the files and rename it.
You can use the get files activity to get a array of strings with all the paths of the files. For the renaming you can use the copy file activity in a for each loop. Set the file path from the array to the input file and for the destination path change the same file path as you wish. Then delete the old file.
Maybe it’s easier possible with only using the move file activity.
In which package do we get Get file activity?
You can use the below code to get the list of files in a given folder…
This will give you a string array of files.
Next use a for each activity to loop through each file.
Inside the loop, use the move file activity…
For the source give the item variable of the loop, for the destination, give the file path of the item variable along with the new file name and extension
Solution should look like that: