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
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!


Tagged with:
Posted in Scripting
IT Pro Summer GP
IT Pro Summer Grand Prix

IT Pro Summer Grand Prix

Microsoft Virtual Academy

MS Virtual Academy

Pro-Exchange / Pro-Lync / Pro-Office365

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: