Re: How to echo a "tab"

G

guard

Clint said:
How do you echo a tab keystroke to a log file within a batch file?

For example: echo %username% "tab" %computername% >> logfile.txt

The environment variable #TAB is one of the "CONSTANTS" provided by the
(FREE) Advanced NT/2K/XP/K3 Command Library (ntlib.cmd).

Using your example:

ECHO %username% %#TAB% %computername% >> logfile.txt

or, without the extra spaces,

ECHO %username%%#TAB%%computername%>> logfile.txt

*******

There are also many other mnemonically named #CONSTANTS available to assist
in writing self-documenting cross-platform scripts.

To get your copy of ntlib.cmd, see (http://ntlib.com).

*******
-tsg
____________________________________________________________
TheSystemGuard.com | BoomingOrFuming.com | MountCommands.com
Free and "Almost Free" Knowledge for Windows System Admins!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top