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.

I have a path like this: Y:\xxx\dd sss\aaa\ccc

Y:\ is mapped to an FTP address. Now when I try to use start to open my folder I cannot. Command prompt makes mistake and goes to Y:\xxx\dd folder!

I already tried to use %20 instead of a space, but also unsuccessful.

I run this using a batch file from an Oracle form.

share|improve this question
    
Not exactly sure what you're trying to do. Maybe C:\Windows\explorer.exe /e,"Y:\xxx\dd sss\aaa\ccc". –  martineau Jan 30 '11 at 13:39
    
You scan change to the folder and the drive at the same time at a cmd prompt with cd /D "Y:\xxx\dd sss\aaa\ccc". –  martineau Jan 30 '11 at 13:54
add comment

3 Answers

up vote 14 down vote accepted

Use quotes like this:

start "" "Y:\foo bar\baz"

The start builtin command can be used to create new console windows, if you give it a console-based program (or nothing at all, in which case it starts the default cmd.exe shell).

If the first argument is quoted, start assumes it's the title for the new console window, so give it an empty title. The following argument will then be correctly interpreted as the command to run / file to open.

share|improve this answer
    
OW, Now I need to go back home,tomorrow I will try and inform u,But I guess it will work because I saw it some where else.Thanks –  rima Jan 30 '11 at 13:57
    
Thanks I check it in home it works fine –  rima Jan 30 '11 at 16:05
    
thanks for the note about the empty quote! Now I finally understand why sometimes a console window opens instead of an Explorer window. :) –  Synetech Feb 20 '11 at 5:59
    
@grawity +1, you save my day –  uvts_cvs Sep 25 '12 at 12:29
add comment

Put it in quotation marks like so:

start "" "Y:\xxx\dd sss\aaa\ccc"
share|improve this answer
    
it's not working -- by run like this just a window of CMD just showing to me... :( –  rima Jan 30 '11 at 13:15
    
Remove the start. –  martineau Jan 30 '11 at 13:29
    
Also try "Y:\\xxx\\dd sss\\aaa\\ccc". –  martineau Jan 30 '11 at 13:32
    
Error: The file name ,directory name or volume label syntax is incorrect –  rima Jan 30 '11 at 13:38
    
@rima, does the thing you want actually work for any other path without spaces? –  Arjan Jan 30 '11 at 13:39
show 6 more comments

Put the part with the spaces into quotation marks, eg.:

C:\path\"to something"\file

Your welcome.

share|improve this answer
    
Wrong answer bro... –  rima Jan 30 '11 at 16:05
add comment

Your Answer

 
discard

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.