Create a hardlink from the network

You cannot create a hardlink to a remote drive, or even between two local drives. A hardlink must point from one point in a filesystem to another point in that exact same filesystem.

What you want is a symbolic link, which acts more like a shortcut, and can point to remote files or shares.


I use this command to create symbolic links on windows (almost aways in my web server folders of xampp). This is an example to use that:

mklink /D "C:\mySMBremoteServer" "\\server\shared_folder"
  • mklink -> command to create links
  • /D -> create a simbolic link (manage the same folder remotely)
  • "Locale_folder" -> path to make the local link
  • "remote_link" -> path to the samba server

I leave here the manual mklink Windows manual and I hope it helps.

SPANISH TRASLATION

Yo uso este comando para mi servidor local de xampp ya que no hay manera de crear carpetas virtuales... si no te funciona (a mi hasta la fecha me va de lujo) prueba con la opcion /H aun que no la he probado.

Este comando lo que hace es crear un "acceso directo" al destino que quieras, modificandolo si así es necesario remotamente