ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA:Internet Shortcut URL Extractor

(1/1)

magician62:
The basic concept of my idea is the ability to look at an Internet Shortcut and extract the URL to a txt file in the same folder using the same name

Ie

Internet shortcut
>
Internet Shortcut.txt containing the URL

The ability to process every subfolder in a selected folder and perform this funtion would reduce several hours work to minutes. An aditional option of ignoring if the appropriate txt files already exists would be great, as it would allow a fast re-run if required a a later date.

AHK is preferable as I can then learn better how it is done. :)

skwire:
When you say "Internet shortcut" are you talking about a .URL file?

skwire:
If you did mean .URL files, here you go (for use with AHK_L):


--- Code: Autohotkey ---; Set file encoding.FileEncoding, UTF-8-RAW ; Present folder selection dialog to user.FileSelectFolder, myFolder, , 2 If ! ( ErrorLevel ) ; If user did not press cancel.{    ; Iterate recursively over .URL files in chosen folder.    Loop, % myFolder . "\*.url", 0, 1    {        ; Clear var of stale data.        myURL := ""                ; Read URL value of .URL file.        IniRead, myURL, % A_LoopFileFullPath, InternetShortcut, URL         ; Crack path of .URL file.        SplitPath, A_LoopFileFullPath, , myOutDir, , myOutNameNoExt,          ; Create new text file with URL data.        FileAppend, % myURL, % myOutDir . "\" . myOutNameNoExt . ".txt"    }}

magician62:
Hi Jody, many thanks will be a few days before I can test, rebuilding the PC :(

Navigation

[0] Message Index

Go to full version