JSI Tip 6968. How do I echo a tab character in a batch file?

Jerold Schulman

July 13, 2003

1 Min Read
ITPro Today logo in a gray background | ITPro Today

To echo a tab character in a batch file:

1. Edit your batch file in Notepad.

2. Depress the Tab key in the appropriate places in your echo command line.

Example:

If you type the following, replacing each occurance of with the Tab key:

@echo %computername%%UserName%#

The following should be displayed:

JSI009                  Jerry                   #



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like