• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6428
  • Last Modified:

Batch file START command - application path with space

I am new to creating a batch file..

I want to use the START command to execute an application. Since the application path has space, the command failed. I tried putting double quote around the application path, but still doesn't work.

START /WAIT C:\Program Files\abc.exe

Can anyone help ?

0
jshao825
Asked:
jshao825
1 Solution
 
Christopher McKayCommented:
try this:

start "c:\Program Files\abc.exe" /wait

Hope this helps!

:o)

Bartender_1
0
 
rindiCommented:
Try C:\Progra~1\abc.exe
0
 
jshao825Author Commented:
How about for C:\Progra~1\test folder\abc.exe

I tried C:\Progra~1\test~1\abc.exe   but didn't work
0
 
oBdACommented:
The syntax of the start command is somewhat incorrectly described ("start /?"). The problem is that if you put spaces around the path, you *have* to specify the title, or the program path will be considered the title, and the program won't be run. It runs fine without title if there are no spaces and no quotes, though.
Anyway, just use
start "" /wait "C:\Program Files\abc.exe"
Note the empty pair of quotes before the "/wait", they're doing the trick. You can of course use
start "abc" /wait "C:\Program Files\abc.exe"
as well.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now