Hello Team,
I have some words which i need to split
"B.Com Certificate / NIIT Limited Experience Letter / NIIT Limited Offer Letter / INTER MarkList "
also i have to pick the same file from folder is anyone help me…
Thanks
Rajnish
Hello Team,
I have some words which i need to split
"B.Com Certificate / NIIT Limited Experience Letter / NIIT Limited Offer Letter / INTER MarkList "
also i have to pick the same file from folder is anyone help me…
Thanks
Rajnish
Hi @Rajnish_Arora,
First of all, you can split your data with split. You can check for files for each directory using for.
fileArray [str][str] = yourValue.Split(“/“c)
Directory.GetFiles(filePath,item.ToString+”*”)(0)
Hi @muhammedyuzuak
Thanks you for the help but its giving error "Path Exists: Index was outside the bounds of the array’'…
Can you update the fields like this.
yourValue.Split(“/”.ToArray,StringSplitOptions.RemoveEmptyEntries)
Directory.GetFiles(filePath,item.TrimStart.TrimEnd+”*")(0)
Regards,
MY
Hi @Rajnish_Arora ,
Assuming we have the string data in a string variable like below :
InputStr = "B.Com Certificate / NIIT Limited Experience Letter / NIIT Limited Offer Letter / INTER MarkList "
Maybe we could try with the Below Steps and Check :
Assign
Activity, Split the String/Text data based on /
assuming that is the delimiter.fileNamesArray = Split(InputStr,"/").ToArray
Here fileNamesArray
is a variable of Type Array of String
.
fileList = Directory.GetFiles("YourFolderPath").Where(Function(x)fileNamesArray.Any(Function(y)y.Trim.ToLower.Contains(Path.GetFileNameWithoutExtension(x).ToString.ToLower.Trim))).ToArray
Here, fileList
is a variable of Type Array of String
. It contains list of file paths matching the Input String Data provided.
Let us know if this doesn’t work.
Its working fine but we are facing one issue sometime we are getting pdf and jpg files so how we can make it dynamic so it can take any extension. On attached snip its taking jpg file.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.