ConvertUNC2URL.bat

The old Lotus Notes client at my current assignment doesn’t seem to like UNC-paths. If I want to make sure links are clickable I need to convert the path to a URL.

I originally used a excel workbook for it, but that’s obviously overkill. Enter the script below:

@echo off
cls
set url=%*
set url=%url:\\=file://%
set url=%url:\=/%
echo %url% | clip
echo URL has been converted and copied to your clipboard!
set url=

I simply launch it from the command prompt and pass the UNC path to it. The script returns the corresponding URL to my clipboard for easy pasting!

http://blog.koenvermoesen.be/about-koen/

Tagged with:
Posted in Scripting
IT Pro Summer GP
IT Pro Summer Grand Prix
MVA
Microsoft Virtual Academy
Pro-Exchange
Pro-Exchange / Pro-Lync / Pro-Office365
MEET

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 158 other followers

%d bloggers like this: