Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Linux you can do this:

$ php blah.php > some.log &

to run blah.php in the background. This is the same as Ctrl+z then the bg command.

Is there an equivalent of either/both for the Windows Command Prompt?

share|improve this question
1  
I don't believe there is, but you can launch as many command prompts as you need. What are you trying to accomplish? – uSlackr Aug 27 '12 at 17:37
    
I'm using > to log to a file, and I don't want to prompt to just sit out there. I may want to continue working on the same prompt window w/ the same directory. – DOOManiac Aug 27 '12 at 17:39
    
What version of windows? – EBGreen Aug 27 '12 at 17:43
    
Windows 7 (64-bit) – DOOManiac Aug 27 '12 at 20:18
up vote 14 down vote accepted

Windows does have a similar functionality to Linux's &, to launch processes such that they don't take over your console. Instead of a command-line flag, though, it's a command prefix.

Simply run your command with start in front of it, as such: C:\> start myprog.exe

It also works with commands, not just executables: C:\> start dir

This will start a new console window and run the command inside it.

If you don't want to have a new console window come up when running the command, use the /B switch, like this: C:\> start /B myprog.exe

There are several other options you can specify to configure how to run the command. You can figure them out by reading the help for start by using start /?.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .