Command prompt / batch file equivalent of UNIX '&'

M

MS

Hi,

In a UNIX/LINUX shell you can add a '&' to the end of a command line so
that the line returns immediately, so that if you're just starting a
program or something from the shell you don't have to wait for that
program to finish before being able to continue to write commands in the
shell.

EG.

emacs home\text\mytextfile &

Is there a Windows XP/2000 equivalent to this?

Thanks,

MS
 
M

Mark V

In said:
Hi,

In a UNIX/LINUX shell you can add a '&' to the end of a command
line so that the line returns immediately, so that if you're
just starting a program or something from the shell you don't
have to wait for that program to finish before being able to
continue to write commands in the shell.

EG.

emacs home\text\mytextfile &

Is there a Windows XP/2000 equivalent to this?

See
START /?

Hint, include
""
for TITLE even if you are not specifing a Title and you will avoid
grief when trying to use quoted paths.
 
M

MS

Thanks for the pointer Mark.

The following line works fine in a .BAT file:

"C:\Program Files\WinDVD\windvd" "J:\DVD\SOME MOVIE PATH\"

WINDVD opens with the movie specified (but the cmd prompt stays till
windvd exits).

But neither this:

"START C:\Program Files\WinDVD\windvd" "J:\DVD\SOME MOVIE PATH\"

nor this:

START "C:\Program Files\WinDVD\windvd" /D"J:\DVD\SOME MOVIE PATH\"

nor this:

"START C:\Program Files\WinDVD\windvd J:\DVD\SOME MOVIE PATH\"

works as I want (nor does every variation I tried).

All I want to do is to be able to double click a .bat file in my dvd
folder which will load windvd with the movie specified in the .bat file
and have the command prompt return (and so disappear immediately) before
windvd exits.

So easy to do in UNIX, what am I missing to do this in Windows?

Thanks and sorry for being stupid.

MS


Mark V emailed this:
 
F

foxidrive

Thanks for the pointer Mark.

The following line works fine in a .BAT file:

"C:\Program Files\WinDVD\windvd" "J:\DVD\SOME MOVIE PATH\"

WINDVD opens with the movie specified (but the cmd prompt stays till
windvd exits).

start "" "C:\Program Files\WinDVD\windvd" "J:\DVD\SOME MOVIE PATH\"
 
M

MS

start "" "C:\Program Files\WinDVD\windvd" "J:\DVD\SOME MOVIE PATH\"

Thanks for the clarification, it works fine now. I misunderstood what Mark
said thinking I should put 'start' within the "", like this:

"START C:\Program Files\WinDVD\windvd" "J:\DVD\SOME MOVIE PATH\"

instead of having a pair of (empty) "".

Cheers.
 
T

Todd Vargo

MS said:
Thanks for the clarification, it works fine now. I misunderstood what Mark
said thinking I should put 'start' within the "", like this:

"START C:\Program Files\WinDVD\windvd" "J:\DVD\SOME MOVIE PATH\"

instead of having a pair of (empty) "".

Excellent, we learned something new together. Now here is another useful
tidbit for everyone.

This command syntax does not work for Windows 95/98/ME. As such, it would be
prudent to avoid crossposting Windows NT/2000/XP related batch questions to
alt.msdos.batch. However, there is a sister group, alt.msdos.batch.nt, which
complements this group, but as the same regular posters read both groups,
crossposting is generally unnecessary. Happy batching.
 
T

Timo Salmi

MS said:
Thanks for the clarification, it works fine now. I misunderstood what
Mark said thinking I should put 'start' within the "", like this:
"START C:\Program Files\WinDVD\windvd" "J:\DVD\SOME MOVIE PATH\"
instead of having a pair of (empty) "".

Actually START ["title"] which can have an empty title. And
frequently does.

All the best, Timo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top