Extracting the URL from a url-file 
Author Message
 Extracting the URL from a url-file

Does anyone now how I can execute url-files by using wsh ?

I tried this approach but it doesnt work:

    ie.navigate WSHScript.SpecialFolders.Item("Favorites") & "\" &

where strFileName is a URL-file.

I have to extract the http-address by some means but I cant figure out

Knut Hurlen

Sun, 17 Jun 2001 03:00:00 GMT  
 Extracting the URL from a url-file
Iam helped me with this.  The lnk file is simply text so all you need to do
is open the file for reading and parse out the  URL line.

Try something like this:

dim wshshell, fso, file, f, result, rline, fh, fn
const ForReading=1
on error resume next
set wshshell=wscript.createobject("wscript.shell")
file='you can put in the exact path and file name of the link from your
favorites folder d:\winnt\profiles\jeff\favorites\microsoft link.url
set fso=createobject("Scripting.FileSystemObject")
set fh=fso.Getfile(file)
set f=fso.OpenTextFile(file,forReading)
do while f.AtEndOfStream <>True
  if result="1" then
    wscript.echo right(rline,len(rline)-4)   'this is the URL line
 end if


Sun, 17 Jun 2001 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. WSH that makes a url file Makes BlueDragon.url

2. extracting value from URL vbscript???????

3. Extract pagename from URL

4. Extract url from script-tag

5. extracting URL

6. how to use url.Encode for NS problem w/ params in URL

7. URL, Getting the url using asp

8. Convert relative URL to absolute URL?

9. Clarification of question: How do I determine current URL from an external file/program

10. AN: Checking url links in PDF files

11. VB6 Web Browser-Loading URL's from a sequential file

12. how can i download file from other url ?????


Powered by phpBB® Forum Software