Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Triming the certain characters

Status
Not open for further replies.

nikhil2010

Programmer
Nov 11, 2010
9
IN
Hi I was working on creating folders by reading a text file.
I'm able to do that, but if folder already exists I wanna display just the folder name which I'm unable to do

for ex: if path where folder needs to be created is D:\vbscript

then I want only vbscript not D:\ so how do I remove that D:\
 
Alternately, the code below should display everything after the last "\":
Code:
sPath = "D:\vbscript"
z = InStrRev(sPath, "\")
wscript.echo Mid(x, z + 1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top