By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,046 Members | 2,058 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,046 IT Pros & Developers. It's quick & easy.

Shortcut target with spaces in file name

P: n/a
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
Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
md
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

"md" <so*****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.