Show/Hide Toolbars

Reporting Services CMD

Navigation: Quick Start

Redirection

Scroll Prev Top Next More

Output of commands and batch files can be redirected from the screen to a file on the PC

 

 

Example using the command DIR

 

 

Redirect overwrite the file using >

 

eg. dir > c:\dirList.txt

 

 

Redirect append to the end of a file using >>

 

eg. dir >> c:\dirList.txt

 

 

Notes

 

1.There must be a space before and after the redirect > or >>

 

eg

 dir>c:\list.txt                will fail

 dir > c:\list.txt                will succeed

 

2.Using the append redirect (>>). It will create the file if it does not exist.

 

eg

 dir>>c:\list.txt                will fail

 dir >> c:\list.txt                will succeed