AzKay Posted November 3, 2006 Posted November 3, 2006 For example, If ive got:http://ftp-mozilla.netscape.com/pub/mozill...2/en-US/Firefox Setup 2.0.exeHow 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- #
xcal Posted November 3, 2006 Posted November 3, 2006 (edited) _PathSplit maybe. Edited November 3, 2006 by xcal How To Ask Questions The Smart Way
AzKay Posted November 3, 2006 Author Posted November 3, 2006 (edited) That looks like what I need. Ill try it out. Works perfectly. Thanks. Edited November 3, 2006 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- #
xcal Posted November 4, 2006 Posted November 4, 2006 (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 November 4, 2006 by xcal How To Ask Questions The Smart Way
Moderators SmOke_N Posted November 4, 2006 Moderators Posted November 4, 2006 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) 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.
xcal Posted November 4, 2006 Posted November 4, 2006 Ahh even better. So many ways to torture poor strings... How To Ask Questions The Smart Way
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now