Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

[How To]Extract URL string from a .url file

  • Please log in to reply
2 replies to this topic
  • Members
  • 1 posts
  • Last active: Jul 18 2013 11:06 PM
  • Joined: 16 Jul 2013

Been working on this script of mine fora couple weeks now, and came across this interesting little trick that might or might not be well known, but since I don't see it posted anywhere, I figured I'd share it.


Basically, i'm writing a shortcut manager, because having over 100 shortcuts on your desktop is annoying, but a lot of these are steam shortcuts, which are .url files, not .lnk files. I'm not 100% sure if this will work for every .url file, as I saw posted somewhere they're not all the same, but it seemed to work just fine for the ones I tried it on (namely, created from Steam).


I found that .url files internal structure is strangely similar to a MS INI file (.ini), so I decided to try using IniRead to extract the string, and what do you know, it freaking worked =O.

IniRead,ExtractedURL,BioShock Infinite.url,InternetShortcut,URL ;Steam generated BioShock Infinite desktop shortcut

Now, I haven't actually put this to any practical use yet, because I'm still working on other script components for my manager, but I figured this would be fun to share. the Ini* commands are more useful than I give them credit for. As long as the file follows the usual INI structure [Section] Key=value, Ini* commands will get along nicely with them.

A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

Thanks for sharing your discovery.

Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan

  • Members
  • 744 posts
  • Last active: Sep 01 2015 02:54 PM
  • Joined: 10 Jul 2013

This I knew.
Anyway . . does anyone know how to rate the url by editing it?
I haven't figured it out.