PC Review


Reply
Thread Tools Rate Thread

Command prompt / batch file equivalent of UNIX '&'

 
 
MS
Guest
Posts: n/a
 
      12th May 2006
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
 
Reply With Quote
 
 
 
 
Mark V
Guest
Posts: n/a
 
      12th May 2006
In microsoft.public.win2000.cmdprompt.admin MS wrote:

> 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.
 
Reply With Quote
 
MS
Guest
Posts: n/a
 
      12th May 2006
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:
> In microsoft.public.win2000.cmdprompt.admin MS wrote:
>
>> 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.

 
Reply With Quote
 
foxidrive
Guest
Posts: n/a
 
      12th May 2006
On Fri, 12 May 2006 13:56:25 GMT, MS wrote:




> 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\"
 
Reply With Quote
 
MS
Guest
Posts: n/a
 
      12th May 2006
> 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.
 
Reply With Quote
 
Todd Vargo
Guest
Posts: n/a
 
      12th May 2006

"MS" <(E-Mail Removed)> wrote in message
news:7B19g.68134$(E-Mail Removed)...
> > 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) "".


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.

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)


 
Reply With Quote
 
Timo Salmi
Guest
Posts: n/a
 
      12th May 2006
MS <(E-Mail Removed)> wrote:
> 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

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
private.php?do=newpm&u= <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Useful script files and tricks ftp://garbo.uwasa.fi/pc/link/tscmd.zip
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The simple way to disable/enable LAN from command prompt, with a batch file, using devcon.exe setup21@gmx.de Microsoft Windows 2000 Networking 4 22nd Jul 2008 08:52 PM
How create batch file using Windows SDK Command Prompt? Ronald S. Cook Microsoft C# .NET 4 11th Apr 2007 06:47 PM
Microsoft Access 2000 and Batch file / Command Prompt =?Utf-8?B?SGF0czY2Ng==?= Microsoft Access 0 12th May 2005 07:58 PM
unix lpc command equivalent tslu69@yahoo.com Microsoft Windows 2000 0 20th Aug 2004 10:23 AM
hide command prompt window when running batch file ? scott Microsoft Windows 2000 3 19th Sep 2003 12:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:57 PM.