Hi, I would like my robot to go through all the files - copy the file names to a variable, enter the application, run on this application and again to the next file, copy the file name and so on until it goes through all the files.
I used For each Directory.GetFiles(“C:\Users\login\Desktop\folder1\folder2”)
and in “for each” - set variable value: variable = Path.GetFileNameWithoutExtension(“C:\login\Desktop\folder1\folder2”) - but it shows me the name of the folder, not the file. The files can have different names, the names are not constant, so how can I make it get the filename without specifying the filename in the code.
For Each item In Directory.GetFiles("C:\Users\login\Desktop\folder1\folder2")
Assign fileName = Path.GetFileNameWithoutExtension(item)
// Use the fileName variable in your automation workflow
End For Each
Hey @sullivanne
You can use Directory.GetFiles("C:\Users\login\Desktop\folder1\folder2") as array of strings and then in for each activity use assign value = Path.GetFileNameWithoutExtension(item)