Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 01, 2015, 05:25:00 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Unc to Web link converter  (Read 5057 times)

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,896
    • View Profile
    • Donate to Member
Unc to Web link converter
« on: February 04, 2009, 08:43:33 AM »
Had an issue here where the mindtouch wiki that's used on an internal project mangles up UNC path style links. So I created an autohotkey script that converts it into a file:// protocol link and copies it to the clipboard. Thought maybe it would be useful for someone on here (or their colleagues).

You can do the same by pasting the link into Firefox and copying the result - but try to tell that to someone that tries to map a network drive using the tools menu in outlook (how to install firefox, get the link copied out the email, into the address bar, coping it out again and into their wik).

Code: [Select]
; Unc2Web.ahk
#NoEnv
InputBox, OutputVar, UNC TO WEB LINK, Please put in a link to the UNC Network Path:`n`n For example: `n\\f_server2\share\New Folder\index.html`n\\f_server2\share\New Folder
if NOT ErrorLevel
{
OutputVar := RegExReplace(OutputVar, "\\\\", "file://") 
OutputVar := RegExReplace(OutputVar, "\\", "/") 
clipboard := OutputVar
InputBox, bla, UNC TO WEB LINK, The following link has been copied to your clipboard. Use it in wikis or other webpages - this link only works internally.,,,,,,,,%Outputvar%
}

2009-02-04_135338.jpg
2009-02-04_135353.jpg
2009-02-04_135413.jpg
« Last Edit: February 04, 2009, 08:53:10 AM by justice »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,218
    • View Profile
    • Coding Snacks by Lanux128
    • Donate to Member
Re: Unc to Web link converter
« Reply #1 on: February 04, 2009, 07:25:19 PM »
nice, downloading it.. :Thmbsup:

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,896
    • View Profile
    • Donate to Member
Re: Unc to Web link converter
« Reply #2 on: June 26, 2012, 07:17:12 AM »
If you want to play with the latest source, you can now fork from Bitbucket:
https://bitbucket.org/svandragt/unc2web

I'll keep posting executable releases in this topic when they're available.