I’m new to UiPath and I’ve been trying to do a loop whereby if the file name contains the client name, the robot will export the file to pdf, else it will show a message box. What should I type in the word application scope if I want to open the file that contains the client name?
FileDir = Directory.GetFiles(Environment.CurrentDirectory+"\WordPdf\","*.pdf")
FileDir | Variable type -> Array(String)
Here -> Environment.CurrentDirector is the folder path
"C:\Users\Dell\Documents\UiPath\Test"
You can with the extension based on needs "pdf"
In the If activity
Path.GetFileNameWithoutExtension(currentItem).Contains(selectedFiles)
This will get only the file name -> Path.GetFileNameWithoutExtension(currentItem)