Home > Software engineering >  Copy the target of a shortcut file (*.lnk) when the target path contains emoji characters
Copy the target of a shortcut file (*.lnk) when the target path contains emoji characters

Time:12-09

My goal is to write a simple Powershell script that will take one mandatory argument, that argument must be a full file path to a shortcut (.lnk) file, then the script will resolve the shortcut's target item (a file or a directory) and copy it into the current working directory of the script.

The problem I found is when testing a shortcut whose target item points to a file or folder that contains emoji chars in the path, like for example:

"C:\Movies\• Unidentified\[

  • Related