Hi , i need ur help to get
example :
D:\OCDC\UAT\Data\2023\10072023\Invoices*Other Company*\my file 123.PDF
output : Other Company
Note : the FolderName could be diffrent each time bieng processed
Thanks
Hi , i need ur help to get
example :
D:\OCDC\UAT\Data\2023\10072023\Invoices*Other Company*\my file 123.PDF
output : Other Company
Note : the FolderName could be diffrent each time bieng processed
Thanks
Try this
str_Path.Split("\".ToCharArray).Reverse()(1)
Hi,
Directory.GetDirectories(“Directory_path”)
Assign - intCounter = 0
While intCounter < arrMyArray.Length
End While
I hope this will help you
ofc why i didnt think of this way hahha,
thankss ya
Try this:
Result = str_Path.Split("".ToCharArray).Reverse()(1)
Hi
Try this
Input= “D:\OCDC\UAT\Data\2023\10072023\InvoicesOther Company\my file 123.PDF”
In Assign
Output= input.Split(“"c)(input.Split(”"c).Count-2)
Result= Invoices**Other Company* *
sure thanks ,
i will wait for a while in case someone can give other efficient way to do it ,
but so far i think this the best and what i had in mind
thanks
You can use regular expression to search for the text between “Invoices” and “\”. Refer to the screenshot below.
You can use the regular expressions to get the required output. Use the below regex to extract the output.
System.Text.RegularExpressions.Regex.Matches(yourstringinput.ToString,“((?<=\\w**).(?=*\\w))”)
Hope it helps!!
As this is a path…it would be good to use path related commands
Path.GetFileName(Path.GetDirectoryName("YourPath"))
or
new DirectoryInfo(System.IO.Path.GetDirectoryName("YourPath")).Name
cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.