Tuesday, April 5, 2011

Strip the file name out of the file path

Strip the file's name out of the file path:

Example: [User::strTest] Value = C:\Test\TestTextFile.TXT
Results: TestTextFile.TXT

RIGHT(@[User::strTest],FINDSTRING(REVERSE(@[User::strTest]),"\\",1)-1)



Strip the file's extension out of the file path:

Example: [User::strTest] Value = C:\Test\TestTextFile.TXT
Results: TXT

RIGHT(@[User::strTest],FINDSTRING(REVERSE(@[User::strTest]),".",1)-1)

No comments:

Post a Comment