input = “Folder1/Folder2/Folder3”
how to split string and store array in this format
b(0) = Folder1
b(1) = Folder1/Folder2
b(2) = Folder1/Folder2/Folder3
Assign string strFolderPath=“Folder1/Folder2/Folder3/Folder4”
Assign string arrFolders=new String(strFolderPath.Split("/“c).Length){}
Assign string arrNewFolders=new String(strFolderPath.Split(”/"c).Length){}
Assign string strDummy=“”
Assign int Count=0
For Each items in arrFolders{
strDummy=strDummy+“/”+item.ToString
strDummy=If(strDummy.Substring(0,1).Equals(“/”),strDummy.Remove(0,1),strDummy) //:Removes the “/” first time. Otherwise you will get /Folder1 as first item instead of Folder1
arrNewFolders(count)=strDummy
}
You can use this template too: (I used just dummy variables, and you can improve the success according to story)
SplitString.xaml (13.3 KB)
thanksss a lot