It's a pain to get network paths renamed. The top answer shows the use of junction links, but those don't work with network paths. Directory links do work to create a link, but those will resolve upon pinning to quick access (to the name of the linked directory, defeating the purpose of creating the link). A solution I found is to create a directory link to the network path, then a junction link to the directory link, then pin that junction link to quick access. Since this is cumbersome, I've created a Powershell script to do it for me:
param([string]$destination, [string]$quickAccessName)
if (-not $destination) {
$destination = Read-Host "Enter the path of the folder you would like to pin to Quick access"
}
$quickAccessBase = "$env:USERPROFILE\Quick access folder shortcuts"
if (!(Test-Path $quickAccessBase)) {
New-Item -Path $quickAccessBase -ItemType Directory | Out-Null
}
if (!(Test-Path $destination)) {
Write-Warning "$destination isn't accessible"
continue;
}
$userAlias = Read-Host "Enter custom name for Quick Access item to '$destination'"
$destination = $destination.Trim('"') # Remove extra quotes from drag & drop
$sluggedDestination = "proxy_link_$userAlias"
$dirLink = "$quickAccessBase$sluggedDestination"
Create Directory Link
if (!(Test-Path $dirLink)) {
New-Item -ItemType SymbolicLink -Path $dirLink -Target $destination | Out-Null
} else {
Write-Error "Your supplied alias already exists, please choose a different one"
}
Get user-entered name for Junction Link
$junctionLink = "$quickAccessBase$userAlias"
Create Junction Link
if (!(Test-Path $junctionLink)) {
New-Item -ItemType Junction -Path $junctionLink -Target $dirLink | Out-Null
} else {
Write-Error "Your supplied alias already exists, please choose a different one"
}
Pin to Quick Access
$shell = New-Object -ComObject Shell.Application
$destinationFolderObject = $shell.Namespace($junctionLink)
if ($destinationFolderObject) {
$destinationFolderItem = $destinationFolderObject.Self
$destinationFolderItem.InvokeVerb("pintohome")
}
As a side effect, the link won't really fully resolve, so for example you won't be able to go to the parent folder in the file explorer as this will just go to the parent directory that holds the links themselves.