THE URL FORMAT

The classic URL file format 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

For a while some vague calculations were given on this page for calculating the date and time of the modified field, but since the first posting of this article I’ve received a lot of input from other people that have experimented with this field:


Changes at a fast pace

Changes slowly

C

C0

34

90

B3

07

DC

C3

01

DE


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

7         - Minimized

3         - Maximized

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/

_______________________________________________________

사용자 삽입 이미지

사용자 삽입 이미지


  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기