Here, 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 Samplepdfs folder.
Let us know if you were able to make it work with your Network Directory path
@supermanPunch
OK
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 ?
@supermanPunch
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.
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 :
<customerID>500054627</customerID>
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.
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.