Sign in to follow this  
Followers 0
AzKay

Get a filename?

6 posts in this topic

For example, If ive got:

http://ftp-mozilla.netscape.com/pub/mozill...2/en-US/Firefox Setup 2.0.exe

How would I get just the "Firefox Setup 2.0.exe"? The string is always changing, So Its not always that link.

Ive looked at the string functions, But I cant figure it out. Ive also searched, And didnt find anything. Yet again, I suck at searching, So that might also be the answer. So, Basically, Is there a function like "INetGetFileName"?


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

That looks like what I need. Ill try it out.

Works perfectly. Thanks.

Edited by AzKay

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You're welcome, but it really wasn't the best way. StringSplit would be better, I think.

$url = 'http://www.somepath.com/and/so/on/etc/filename.ext'

$aurl = StringSplit($url, '/')

MsgBox(0, '', $aurl[$aurl[0]])
Edited by xcal

Share this post


Link to post
Share on other sites

I like the _PathSplit() idea.

Also:

$url = 'http://www.somepath.com/and/so/on/etc/filename.ext'
$aurl = StringTrimLeft($url, StringInStr($url, '/', 0, -1))
MsgBox(0, '', $aurl)

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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