Can I use the "start" command with spaces in the path?

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 a and goes to Y:\xxx\dd folder!

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

I am running this using a batch file from an Oracle form.

2

3 Answers

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.

1

Put it in quotation marks like so:

start "" "Y:\xxx\dd sss\aaa\ccc"
11

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

C:\path\"to something"\file

Your welcome.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like