I believe you have the Network Directory Path, Could you maybe try retrieving the files available in the Network Folder using the below Expression :
Directory.GetFiles("Your Network Directory Path").ToArray
After maybe checking on this, we can introduce further steps on checking the data within the files and searching for the particular number.
Let us know if you knew about this method and have already tried it.
March 17, 2023, 6:27am
How I can implement this checking ?
Directory.GetFiles(“Your Network Directory Path”).ToArray
I am new in UiPath, Thanks
You can try with this setup :
filePaths is a Array of String type variable. The “Samplepdfs” is the Folder name, as it is present in the Project Directory itself, I did not have to provide the full folder path.
In the Output Panel, we must be able to get the File paths of the files present in the
Let us know if you were able to make it work with your Network Directory path
March 17, 2023, 7:15am
I guess you copy pasted the formula…Please replace the double quotes in the code again…by removing them
March 17, 2023, 7:20am
Remove the “” ?
I put my path in “My path”.
March 17, 2023, 7:22am
It works, but how it can help me ?
This directory is a dynamic one
I need to check it every X seconds until the IDcustomer will appear
Do you see the file path that contains the number that you want ?
If so, then we would need to include further steps in the Process Developed.
But before that could you confirm what are the file types, what file types are you looking for that has your data or number ? Is it a .txt file ? .xml ?
For this part, we would again require your help to understand what is the total requirement. Are we really supposed to check every x seconds ? What is the manual process ?
March 17, 2023, 7:29am
I don’t know in witch batch file (what you found in write line) the specific XML (there is the IDcustomer placed)
Therefore I used the notepad++ - there I paste the ID number and it find me the batch file there is the XML
Could you give more details of your total process that you want to perform ?
What do you do after we have found the ID number in the xml file ? Do give more details so that we could try to sum up the requirements within a Single post.
March 19, 2023, 7:29am
I need to read XML that is inside a Batch file (within it there are several merged XMLs).
Since I don’t know in which batch file the same XML is found (it is dynamic) it is created after a new customer is created in the system, so I have to locate the same batch file only through Notepad++
I search by the customer ID number I created and I am shown the following.
What I want is after I pasted the customer number and found it, to read the data of the customer number (actually do verification) from the Notepad++ search result
For this above mentioned purpose, as said earlier, we can use the below Steps :
Use Directory.GetFiles(“Your Network Path”,“*.xml”) and get the list of all the xml files present in the Folder.
Next, Loop through the files, and read the file using
Read Text File activity.
Check if the text data present has the customer ID present in it, specifically in the xml format below :
For this we can use a Regex IsMatch for identifying if it is present or not.
If present within the file, then we get to know which file contains this number, we can then read that file data, or parse that file as XML document and then perform the actions required.
Check the example workflow below:
Files_GetRequiredFile_ForProcessing.zip (4.4 KB)
Output Visuals :
Maybe this part is not clear yet, However I believe when using the
Directory.GetFiles() previously you were able to get all the xml files as well.
However, try the workflow and apply it to your requirements and let us know what are your findings.
March 19, 2023, 8:42am
e Directory.GetFiles(“Your Network Path”,“*.xml”) and get the list of all the xml files present in the Folder.
Thank you very mach, it works !!!
March 19, 2023, 1:05pm
How can I do verification on this ?
As also mentioned in previous posts, we do not know your complete process or the task that you are trying to perform, hence we only understood that you would want to find a file that has a customer ID in it.
So we provided an example workflow.
The other requirements as to the verification steps are not known to us yet.
If you have many more steps to be performed, do create a Separate topic on it, So that we can provide help on it separately.
March 22, 2023, 2:32pm
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.