Windows shortcut doesn't work: how to enclose filenames with spaces?
- by Olivier Pons
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?