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!