Toggle between the UNC path and mapped drive letter, when on a network drive.#refresh@script JScriptfunction OnClick(clickData){ var curPath = clickData.func.sourcetab.path + "\\"; var curPath_UC = curPath.toUpperCase(); var objNetwork = new ActiveXObject("WScript.Network"); var drives = objNetwork.EnumNetworkDrives(); var newPath = ""; for (i = 0; i < drives.length; i += 2) { var driveLetter = drives.Item(i ) + "\\"; var driveLetter_UC = driveLetter.toUpperCase(); var driveUNC = drives.Item(i+1) + "\\"; var driveUNC_UC = driveUNC.toUpperCase(); if (curPath_UC.substr(0,driveLetter_UC.length) == driveLetter_UC) { newPath = driveUNC + curPath.substr(driveLetter.length); break; } else if (curPath_UC.substr(0,driveUNC_UC.length) == driveUNC_UC) { newPath = driveLetter + curPath.substr(driveUNC.length); break; } } if (newPath != "") { var cmd = clickData.func.command; cmd.ClearFiles(); cmd.RunCommand('Go PATH="' + newPath + '"'); }}