Create .url files

NickOlsen
09-29-2004, 11:25 AM
One of the functions my my program editing a users IE Favorites. But when I got to rewrite the .url file, how do I specify what webiste you link the file to?

For example, I have a favorites file in "C:\Documents and Settings\User Name\Favorites\test.url" and lets say it links to www.google.com. But in my program I have a datagrid that lists the file name (test) and then the user can change the file name to something else, say "test2".

The way I have it handeled now, I delete everything in the specific favorites folder and then I want to recreate all the .url files. But if i just create "C:\Documents and Settings\User Name\Favorites\test2.url", it has no shortcut to a website. I could do a File.Move(X,Y), but I would rather just create a new .url file and specify what webpage it should be linked to.

Any ideas on how to specify the url for a .url file to link to?
Also, if I have an exisiting .url file, how do i determine what url it links to currnetly?

Thanks!

John
09-29-2004, 11:38 AM
Open the file and put this in it:
[InternetShortcut]
URL=http://www.xtremevbtalk.com/showthread.php?p=857778#post857778
That's it. The link inside the file is the URL of where clicking the file will take you. Open any one of the files in your favorites directory in Notepad to see other sections that can be used in the .url files.

NickOlsen
10-01-2004, 12:03 PM
Perfect ...thanks so much

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum