There is an application I run it through a batch file (cmd):

start /wait c:\Soft\12.exe start /wait notepad 

Everything works fine, but if there is a space in the application or directory, then how to be? Those. how to run it?

start / wait c: \ Work Soft \ 1 2.exe

    4 answers 4

    Answer:

     start /wait "заголовок окна" "c:\Work Soft\1 2.exe" 

      Try

        start /wait "c:\Work Soft\1 2.exe" 
      • Wow! 5 put UP'y do not know the commands of DOS'a ... Did you try it yourself, what did you write? I have already figured out. In this example, from alexlz you get a call to the command processor window with the window title "c: \ Work Soft \ 1 2.exe" and the application DOES NOT START! - I_CaR
      • Sadly Kick me out of archeology. Yes, I did not try to run it myself - nowhere. And, by the way, what is the "window title" in dos? - alexlz
      • :) I wanted to say - the title (title) of the command processor window;) This is what I call it from the old memory ... I just also took it for 2 hours because of this feature ("I make a sub profile of the user) implemented (example) : start / wait "" "c: \ Work Soft \ 1 2.exe" i.e. as if with a dummy for titla. - I_CaR
      • Well, do not dos it. cmd.exe is no longer dos. (in dose / command.com command). And I have cmd.exe on start /? about the title of the window says nothing (wine 1.4). When did this crap appear? - alexlz
      • @alexlz from the very first version. If there are quotes, then the title of the window. - Pavel Mayorov
       start /wait "заголовок окна" /D "c:\Work Soft" "1 2.exe" 
      • Interesting idea. - Qwertiy
      • An interesting option, but it is identical to mine, the only difference is that you have a separation of the path to the directory path and the executable file itself. - I_CaR
      • Salt is that in the name of the program for start it is NOT possible to specify the path. Paths to the program are indicated by a separate key / D - DoC
      • Actually in the help all this is written. Otherwise, the path is taken from the current + value from% PATH% - DoC

      Start /wait "c:\\\"work soft\"\\1\\2.exe" As I understand it, you need quotes, because space characters are not good on the way. Do not forget to screen them, most likely and \ also have to be screened, as I wrote

      • 2
        What kind of murk with quotes? - Qwertiy
      • Mark, I think your message will have to be screened too .... - I_CaR