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 Chriss Miller 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
Joined
Nov 11, 2010
Messages
9
Location
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)
 
Hey thanks a ton man now its working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top