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)

Comments

Popular posts from this blog

Practical Web Scraping with Python: A Clean, Safe Pattern for Pulling Company Names & Emails

Run a VBscript using SQL Server.

Pydantic: your bouncer for messy data (with real examples)