You are here:   Home Tips & Tricks To echo a Tab character in a batch file
May
24
2007

To echo a Tab character in a batch file

E-mail
Written by Misha Hanin   

To echo a Tab character in a batch file:

1. Edit your batch file in Notepad or any other text editor.
2. Depress the Tab key in the appropriate places in your echo command line.

Example:

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

@echo %computername%<TAB><TAB><TAB>%UserName%<TAB><TAB><TAB>#

The following should be displayed:

Pelekan-pc                  Pelekan                   #