Shortcut target with spaces in file name

  • Thread starter Thread starter md
  • Start date Start date
M

md

Hi everybody -

I am writing an application to change the target and start in folder in
shortcuts. I am using Mattias Sjögren's ShellLink library (thanks!) but I
found a problem I was hoping someone knows a solution for. I don't think
it's a problem with Mattias's code, but it appears to happen in the call to
the API to change the link target. If I have a path like this:

"\\server\department\division\staff\jsmith\ACR MEETING.doc" (there are two
spaces between ACR and MEETING)
I want to change this to H:\ACR MEETING.doc

However, when I pass this to the .Path property of Mattias's library and
then look at the .Path property it is set to H:\ACR__MEE.doc. I have checked
and I am passing the correct path to the library.

Has anyone seen this before? Does anybody know of a solution?

Thanks very much for your help

Matt
 
After more experimentation it appears this problem only manifests itself if
I am trying to set the shortcut target to a mapped drive. If it's a UNC path
this doesn't seem to happen. Wierd.

Matt
 
Back
Top