Skip to main content
added 2 characters in body; edited title
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

Multiple commands on a single line in windowsa Windows batch file

In unix whenUnix, we can put multiple commands in a single line like this:

$ date ; ls -l ; date 

I tried a similar thing in windowsWindows:

 > echo %TIME% ; dir ; echo %TIME 

But it printed the time and doesn't execute the command dirdir.

How can iI achieve this?

Multiple commands on a single line in windows batch file

In unix when we can put multiple commands in a single line like this

$ date ; ls -l ; date 

I tried a similar thing in windows

 > echo %TIME% ; dir ; echo %TIME 

But it printed the time and doesn't execute the command dir

How can i achieve this?

Multiple commands on a single line in a Windows batch file

In Unix, we can put multiple commands in a single line like this:

$ date ; ls -l ; date 

I tried a similar thing in Windows:

 > echo %TIME% ; dir ; echo %TIME 

But it printed the time and doesn't execute the command dir.

How can I achieve this?

this isn't nesting ...
Source Link
Joey
  • 356.7k
  • 88
  • 704
  • 699

Nesting Multiple commands on a single line in windows batch scriptfile

In unix when we can nest theput multiple commands in a single line like this

$ date ; ls -l ; date 

I tried a similar thing in windows

 > echo %TIME% ; dir ; echo %TIME 

But it printed the time and dosen'tdoesn't execute the command dir

How can i achieve this?

Nesting commands in windows batch script

In unix when we can nest the commands like this

$ date ; ls -l ; date 

I tried similar thing in windows

 > echo %TIME% ; dir ; echo %TIME 

But it printed the time and dosen't execute the command dir

How can i achieve this

Multiple commands on a single line in windows batch file

In unix when we can put multiple commands in a single line like this

$ date ; ls -l ; date 

I tried a similar thing in windows

 > echo %TIME% ; dir ; echo %TIME 

But it printed the time and doesn't execute the command dir

How can i achieve this?

Source Link
Raghuram
  • 4k
  • 2
  • 21
  • 25

Nesting commands in windows batch script

In unix when we can nest the commands like this

$ date ; ls -l ; date 

I tried similar thing in windows

 > echo %TIME% ; dir ; echo %TIME 

But it printed the time and dosen't execute the command dir

How can i achieve this