Seems like a good job for a little VBScript.
The following VBScript (also attached) will take its argument and:
[ul][li]Remove [b]Y:[/b] from the front[/li]
[li]replace it with http://web.company.com/[/li]
[li]replace any [b][/b] with /[/li]
[li]launch the URL with the default web browser[/li][/ul]
It will work with subdirectories, not just those directly below Y:, and it'll leave your clipboard alone. It won't cope well with spaces and other characters that need encoding when used in URLs, but that would be easy enough to add if it was needed.
If you need to change the drive letter or URL they're both near the top of the script.
To run it from Opus you could use this, to launch the current directory:
Launch_Y-Drive.vbs {sourcepath$}
Or you could use this to launch the selected file or directory:
Launch_Y-Drive.vbs {filepath$}
If the path given to the script doesn't start with Y:\ it will show an error message.
[code]option explicit
Dim Args
Dim Shell
Dim PrefixToRemove
Dim BaseUrl
Dim InPath
Dim SuffixPath
Dim UrlToLaunch
' Configuration:
PrefixToRemove = "Y:"
BaseUrl = "http://web.company.com/"
Set Args = WScript.Arguments
Set Shell = CreateObject("WScript.Shell")
If Args.Count = 0 Then
MsgBox WScript.ScriptName & ": No argument given. Give a path as the argument."
WScript.Quit 1
End If
If Args.Count > 1 Then
MsgBox WScript.ScriptName & ": Too many arguments given."
WScript.Quit 1
End If
InPath = Args.Item(0)
If LCase(Left(InPath,Len(PrefixToRemove))) <> LCase(PrefixToRemove) Then
MsgBox WScript.ScriptName & ": Path does not start with " & PrefixToRemove & "."
WScript.Quit 1
End If
SuffixPath = Right(InPath,Len(InPath)-Len(PrefixToRemove))
SuffixPath = Replace(SuffixPath,"","/")
UrlToLaunch = BaseUrl & SuffixPath
Shell.Run UrlToLaunch[/code]
Launch_Y-Drive.zip (532 Bytes)