Hi Team,
I want to read text file,and path of text file is File Name+any date,if path of file name matches consider that as file .
Example as below:
***AGENT_DETAILS_***20190914.txt
If it matches AGENT_DETAILS_,then consider this is path of file.
Hi Team,
I want to read text file,and path of text file is File Name+any date,if path of file name matches consider that as file .
Example as below:
***AGENT_DETAILS_***20190914.txt
If it matches AGENT_DETAILS_,then consider this is path of file.
When you are using the Directory.getfiles you will list of .txt files available in that folder once you got that you for each to loop all and then check the condition in that .txt file contains AGENT_DETAILS this or if yes then read.
Do you mean you want to read all text files from particular folder whose name starts with AGENT_DETAILS_ right ?
If yes then try below expression.
txtFiles [] = Directory.GetFiles("FolderPath","AGENT_DETAILS_*")
Hi @lakshman,
Yes, I want to read text file from particular folder name starts with AGENT_DETAILS_
May i know which variable type we need to give for txtFiles
I have changed to array of string ,and Read Text File only allows string how we need to convert string of array to string
After that assign activity, you have to use ForEach loop to iterate that array if string and inside this loop use Read Text file activity.
ForEach item in txtFiles
Pass item to Read Text file activity
In Read Text file activity, just specify item only and no need to convert it to string.
Change Type argument from object to string in ForEach loop activity properties.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.