File Format Articles
URL File Format
FND File Format
RAW File Formats



An Unofficial Guide to the URL File Format



3rd Edition

Author: Edward L. Blake

 
 

Table of Contents:

  1. The URL Format
  2. Extended URL Format
  3. Settings Not Stored in The URL Format
  4. Links
  5. Contact
  6. Appendix A HotKey Reference


 

This article is an update to my previous postings. A new update to this article (2004) is finally changing around the modified field decoding to using, the more correct method, FILETIME and FileTimeToSystemTime.

This article describes programming information and data specifications for the URL file format. URL files are used as the favourites format in IE, as well as a stand-alone double clickeable resource in the file system created by browsers by dragging the address bar into the file system. These files have the url file extension.

 

The URL Format

The classic URL file specification is pretty simple; it has a format similar to an INI file:

Sample URL File:

[InternetShortcut]
URL=http://www.someaddress.com/
WorkingDirectory=C:\WINDOWS\
ShowCommand=7
IconIndex=1
IconFile=C:\WINDOWS\SYSTEM\url.dll
Modified=20F06BA06D07BD014D
HotKey=1601

The syntax of the file format is like the following:

[Group\Section]
Field=Value
Field=Value
.
.

Each line terminates with CR and LF characters, and uses ANSI as it’s character set. The files can be manipulated using basic file I\O or the GetPrivateProfileString, GetPrivateProfileSection, WritePrivateProfileSection, WritePrivateProfileSring API functions provided by Windows.

URL

The URL field is self-explanatory. It’s the address location of the page to load. It should be a fully qualifying URL with the format protocol://server/page. A URL file is not restricted to the HTTP protocol. In general, at least, whatever that can be saved as a favorite is a valid URL.

WorkingDirectory

It’s the “working folder” that your URL file uses. The working folder is possibly the folder to be set as the current folder for the application that would open the file. However Internet Explorer does not seem to be affected by this field.

Note: this setting does not seem to appear in some versions of Internet Explorer/Windows.

IconIndex

The Icon Index within the icon library specified by IconFile. In an icon library, which can be generally be either a ICO, DLL or EXE file, the icons are indexed with numbers. The first icon index starts at 0.

IconFile

Specifies the path of the icon library file. Generally the icon library can be an ICO, DLL or EXE file. The default icon library used tends to be the URL.DLL library on the system’s Windows\System directory

Modified

This field is generally the most cryptic of all the fields.

Example:

Modified=20F06BA06D07BD014D

Thanks goes to Shawn K. Hall, Jeff Dickey, Ken Schenke, Vivian De Smedt, David Jones, Frank Stocker, and possibly others (I’ve lost some mail since a few years ago) for pointing out this is a FILETIME structure (this article has last been updated in late 2000, basically 3-4 years, so I’ve been late to rewrite this section), The first 8 hex bytes are the FILETIME structure, the last hex byte is found to be a checksum and is unimportant. Since this is a FILETIME structure, you can pass it to the FileTimeToSystemTime API call to get all the discrete date and time elements. However the first 8 hex bytes need to be inverted before passing in to FileTimeToSystemTime. Therefore:

C0 34 90 B3 07 DC C3 01 DE
Invert Rem.
01 C3 DC 07 B3 90 34 C0  
High DW = 01 C3 DC 07 Low DW = B3 90 34 C30  
FileTimeToSystemTime  
16/1/2004 08:06:53  

I’ve wrote a small VB6 demonstration that does this task.

ShowCommand


(Nothing)Normal
7Minimized
3Maximized

Note: this setting does not seem to appear in some versions of Internet Explorer/Windows.

HotKey

The HotKey field specifies what is the shortcut key used to automatically launch the Internet shortcut. The field uses a number to specify what hotkey is used.


833 – Ctrl + Shift + A

834 – Ctrl + Shift + B

835 – Ctrl + Shift + C

.

.

1345 – Shift + Alt + A

1346 – Shift + Alt + B

1347 – Shift + Alt + C

.

.

1601 – Ctrl + Alt + A

1602 – Ctrl + Alt + B

1603 – Ctrl + Alt + C

.

Refer to Appendix A for a more complete table of hotkeys.

Extended URL Format

Sometimes the URL file will provide more information when it is saved as a Favorite with the following format:

[DEFAULT]
BASEURL=url

[DOC#n(#n#n#n…)]
BASEURL=url
ORIGURL=url

Sample URL File with extended URL fields:

[DEFAULT]
BASEURL=http://www.someaddress.com

[DOC#4#5]
BASEURL=http://www.someaddress.com/frame1.html
ORIGURL=frame1.html

[DOC#4#6]
BASEURL=http://www.someaddress.com/frame2.html
ORIGURL=frame2.html

[InternetShortcut]
URL=http://www.someaddress.com/

The purpose of these extra fields is probably for the browser to figure out what HTML documents were loaded in each frame, since the main URL tends to not record the state of its framesets. If you navigate to a framed site, click on a frame link (which changes one of the frames), and add the page to your favorites, the state of the framesets is preserved. When a frame is nested inside another frame, the frame’s section name has the same first numbers, and another few numbers appended, like the following:

Sample URL File with extended URL fields and nested frames:

[DEFAULT]
BASEURL=http://www.someaddress.com

[DOC#4#5]
BASEURL=http://www.someaddress.com/frame1.html
ORIGURL=frame1.html

[DOC#4#5#4#6]
BASEURL=http://www.someaddress.com/frame1a.html
ORIGURL=frame1a.html

[DOC#4#5#4#7]
BASEURL=http://www.someaddress.com/frame1b.html
ORIGURL=frame1b.html

[DOC#4#6]
BASEURL=http://www.someaddress.com/frame2.html
ORIGURL=frame2.html

[InternetShortcut]
URL=http://www.someaddress.com/

Settings Not Stored in The URL Format

Links

Author’s Web Site

Appendix A HotKey Reference

  C+S S+A C+A C+S+A   C+S S+A C+A C+S+A
A 833134516011857 0 817132915841841
B 834134616021858 1 818133015851842
C 835134716031859 2 819133115861843
D 836134816041860 3 820133215871844
E 837134916051861 4 821133315881845
F 838135016061862 5 822133415891846
G 839135116071863 6 823133515901847
H 840135216081864 7 824133615911848
I 841135316091865 8 825133715921849
J 842135416101866 9 826133815931850
K 843135516111867 ; 954146617221978
L 844135616121868 = 955146717231979
M 845135716131869 , 956146817241980
N 846135816141870 - 957146917251981
O 847135916151871 . 958147017261982
P 848136016161872 / 959147117271983
Q 849136116171873 ` 960147217281984
R 850136216181874 [ 987149917552011
S 851136316191875 \ 988150017562012
T 852136416201876 ] 989150117572013
U 853136516211877 990150217582014
V 854136616221878      
W 855136716231879      
X 856136816241880      
Y 857136916251881      
Z 858137016261882      

 

  None Ctrl Alt Shift C+A S+A C+S C+S+A
F1 1126241136368164813928801904
F2 1136251137369164913938811905
F3 1146261138370165013948821906
F4 1156271139371165113958831907
F5 1166281140372165213968841908
F6 1176291141373165313978851909
F7 1186301142374165413988861910
F8 1196311143375165513998871911
F9 1206321144376165614008881912
F10 1216331145377165714018891913
F11 1226341146378165814028901914
F12 1236351147379165914038911915


Disclaimer: The information presented here is for informational purposes only. Please note that I am not the person, and I’m not involved with the one(s), who made the file formats.