Sign in to follow this  
Followers 0
Tsongkie

Noob Q - Extracting file name

3 posts in this topic

Say I have a file c:\text.txt and I just want text.xt without the path, how do i do this?

and the same with http://www.domain.com/abc.txt I just want to extract abc.text

Share this post


Link to post
Share on other sites



Share this post


Link to post
Share on other sites

Say I have a file c:\text.txt and I just want text.xt without the path, how do i do this?

and the same with http://www.domain.com/abc.txt I just want to extract abc.text

1.

$string = "c:\text.txt"

$string = StringRegExpReplace($string, "^.*\\", "")

MsgBox(0, "Result", $string)

2.

InetGet()

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0