Windows shortcut doesn't work: how to enclose filenames with spaces?

Posted by Olivier Pons on Super User See other posts from Super User or by Olivier Pons
Published on 2012-12-07T16:58:43Z Indexed on 2012/12/07 17:11 UTC
Read the original article Hit count: 190

Filed under:
|

Here's my problem: I've made a shortcut on my Desktop (Windows XP (sigh)) like this:

C:\WINDOWS\system32\cmd.exe /k "mysql -u root drupal-defaultadm < ^"C:\Documents and Settings\AAA\Mes documents\Downloads\01.drupal-defaultadm.sql^" && exit"

When I double click on it, the DOS prompt is opened, but I get this error:

File not found.
C:\wamp\bin\mysql\mysql5.5.24\bin>

So I'm trying to do the command "by hand" and only removing the ^:

C:\wamp\bin\mysql\mysql5.5.24\bin>mysql -u root drupal-defaultadm < "C:\Documents and Settings\AAA\Mes documents\Downloads\01.drupal-defaultadm.sql"
C:\wamp\bin\mysql\mysql5.5.24\bin>

And gives no error. I'm pretty sure this has to do with the whitespaces enclosed with ".

How shall I do to make it work?

© Super User or respective owner

Related posts about windows-xp

Related posts about shortcuts