VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Function to get URL from Windows internet shortcut (.url)

by Nepveux Software (4 Submissions)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 2nd November 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Function to get URL from Windows internet shortcut (.url)

Rate Function to get URL from Windows internet shortcut (.url)



Dim Useless, URL As String
Open Filename For Input As #1
 Input #1, Useless
 Input #1, URL
Close #1
If Left$(URL, 4) = "URL=" Then
 URL = Right$(URL, Len(URL) - 4)
ElseIf Left$(URL, 4) = "BASE" Then
 URL = Right$(URL, Len(URL) - 8)
End If
GetURLFromFile = URL
End Function

'Example:
'MyURL = GetURLFromFile("c:\windows\favorites\shortcut.url")
'would return the http://www.whatever.com address

Download this snippet    Add to My Saved Code

Function to get URL from Windows internet shortcut (.url) Comments

No comments have been posted about Function to get URL from Windows internet shortcut (.url). Why not be the first to post a comment about Function to get URL from Windows internet shortcut (.url).

Post your comment

Subject:
Message:
0/1000 characters