Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For example what is the alternative to this command without quotation marks:

CD "c:\Documents and Settings"

The full reason I don't want to use quotation marks is that this command DOES work:

   SVN add mypathname\*.*

but this command DOES NOT work :

   SVN add "mypathname\*.*"

The problem being when I change mypathname for a path with spaces in it I need to quote the whole thing. For example:

SVN add "c:\Documents and Settings\username\svn\*.*"

But when I try this I get the following error message:

svn: warning: 'c:\Documents and Settings\username\svn\*.*' not found
share|improve this question
you meant you have a good reason for 'not' wanting to use quotation marks. –  Thomas May 4 '11 at 12:56
Why, is your quotation mark key broken? :) –  slhck May 4 '11 at 12:57
@Thomas well spotted! –  David May 4 '11 at 13:04
@slhck Don't worry my shift key and number 2 key are perfectly ok! I'm using a command that doesn't appear to allow wildcards when they apear inside quotation marks thats all! –  David May 4 '11 at 13:06
Have you tried old 8.3 formatting of the name ( DOCUME~1 )? –  Justin Pearce May 4 '11 at 15:11

4 Answers 4

up vote 12 down vote accepted

It almost all works for me, but have you perhaps tried line5.. escaping the space with a caret symbol (^)

C:\Documents and Settings\user>cd ..

C:\Documents and Settings>cd ..

C:\>cd Documents and Settings

C:\Documents and Settings>cd..

C:\>cd Documents^ and^ Settings

C:\Documents and Settings>cd..

C:\>cd C:\documents and settings

C:\Documents and Settings>cd..


Looks like the caret symbol may be your answer

C:\>"c:\Documents and Settings\a.bat"

C:\>c:\Documents and Settings\a.bat
'c:\Documents' is not recognized as an internal or external command,
operable program or batch file.

C:\>c:\Documents^ and^ Settings\a.bat

share|improve this answer
since subversion is a programmer's tool, it may be appropriate for SO. here is a related question stackoverflow.com/questions/757435/… it could be you use quotes or caret to get it to svn, then perhaps you use backslash before each space –  barlop May 5 '11 at 8:31
you could also try cygwin's svn, if curious.. with some of the example answers in that question and see if any or variations of them work for you. –  barlop May 5 '11 at 8:47
The caret symbol does directly answer my question so I'll accept your answer. Unfortunately the SVN command doesn't seem to recognise it! If I try it I get this error message "svn 'C:' is not a working copy". I have another way around it though and that's to simply 'cd' to the directory first then execute the SVN command once there. I can even chain the two commands together in a single line using the && operator: cd "c:\Documents and Settings\username\svn" && SVN add *.* –  David May 5 '11 at 8:55
in the CD example, caret isn't necessary, CD doesn't need space escaped –  barlop Feb 7 '14 at 2:53

I found that putting quotes around just one part of the location works. In your case:

SVN add C:\"Documents and Settings"\username\svn\*.*
share|improve this answer
also if one wants to be minimalistic, one can do quotes around just the space or just the chars containing the space, e.g. C:\>cd documents" and se"ttings (though re that cd example , one doesn't need to escape spaces) –  barlop Jul 30 '13 at 11:28
Thanks a lot. I might have upvoted 4 or 5 times if possible.. –  Sayka Jan 12 at 20:25

Use the 8.3 short-filename. For example:

If exist c:\docume~1 goto :Ifoundthesucker
share|improve this answer

The short-filename appears to work like a breeze.

"E:\Progra~1\Java\Eclipse\eclipse.exe" -vmargs -Xms1024m -Xmx2048m

For boosting up the memory.. ;)

share|improve this answer
it may not work if short filename has been disabled –  Lưu Vĩnh Phúc Dec 5 '14 at 17:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.