How can i cut the pathName "Pinnacle" to the end of the path?
D:\Program Files\Pinnacle\Studio 9\bin\amcap.exe
Pinnacle\Studio 9\bin\amcap.exe
Professional Software Development Tools
How can i cut the pathName "Pinnacle" to the end of the path?
D:\Program Files\Pinnacle\Studio 9\bin\amcap.exe
Pinnacle\Studio 9\bin\amcap.exe
Lots of different ways to do it. I would look at the following actions
String.SplitPath
String.Replace
String.Find
String.Right
String.Mid
You could use any of those actions to extract the path. For instance, use String.SplitPath to split the parts of the path into pieces, and then use String.Replace to replace the string "\\ProgramFiles\\" with "" and then piece the folder, filename and extension back together.
HTH Tigg
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Also you could look in the Gallery for the scripts. In the DelimitedStringFunctions.lua file, there is a function, DelimitedStringToTable. Use the backslash as a the delimiter and you'd have the whole path in a table, traverse in reverse til you hit the base folder you want.
traverse in reverse... sounds fun, huh?
Originally Posted by TJ_Tigger
Or you could search the string for the path in reverse without going to a table for the base folder you want, and then use that position to extract the string you want from the mid point to the end of the string.
I do like the traverse in reverse . . . one step forward, two back.. the daily grind.
Originally Posted by Worm
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
tnx guys i success to make something with this code:
result1 = Input.GetText("file");
result = String.Find(result1, "Pinnacle", 1, true);
strEnd = String.Mid(result1, result, -1);
Input.SetText("file", strEnd);
![]()
Congratulations.Glad we were of some help.
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine