Monday, 15 August 2011

batch file - Dos command and its output -


All,

Please guide me, how to print the O / P given below in the DOS window Do you? Being new to DOS command, I do not know what's the string below?

Set ts =% Date: ~ 4,2 %% Date: ~ 7,2% -% Time: ~ 0,2%% Time: ~ 3,2%

Thank you in advance

Welcome CMD Prompt

echo command that will display a value on the screen (ex: echo% date% )

set TS one variable ( ts < / Code>) that can later be called in such a way: % ts%

% date% is a variable that is The system will return the date. % date: ~ 4,2% month (numeric) and % date: ~ 7,2% returns the day of the month (numerical).

% time% is also a variable, but it gives time (24 hours). % time: ~ 0,2% gives hours (24 hour style then 1 noon 13). Returns the % time: ~ 3,2% minutes.

No comments:

Post a Comment