Get the App
SLTechnology News&Howtos  ›  Development  › 

What does it mean within% time:~0,2% in dos?

Shulou Source: shulou.com Published: 2022-06-03 05:41:17 11月17日 Update

This article will explain in detail what the meaning of% time:~0,2% in dos is. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Oh, this is a format problem that stems from time. The last two characters are milliseconds. Most people don't need to do this. The format of minutes and seconds is a little bit more, so this is to remove the last three characters. The preceding 0 indicates that the offset is 0, that is, take the first character, starting with the first character, and-3 means removing the last three characters. The previous zero here can also be omitted. I understand. I don't know if I'm wrong. I hope I don't mislead people. I don't know if you understand what I have said, but there are such posts in the forum. You can search for them. Brother lxmxn has also written such posts and batch processing to explain such usage. Be sure to take a good look at it when you have time.

From set /? For help extracted in:

% PATH:~10,5%

The PATH environment variable is extended, and then only used in the extension result from the 11th (partial

Shift 10) the first five characters of the character. If no length is specified, the default is used

Value, that is, the remainder of the variable value. If both numbers (offset and length) are negative

The number used is the numerical length of the environment variable plus the specified offset or length.

% PATH:~-10%

The last ten characters of the PATH variable are extracted.

% PATH:~0,-2%

All characters of the PATH variable are extracted, except for the last two.

Example:

D:\ > echo% time%

22:41:02.15

D:\ > echo% time:~-3%

. 77

D:\ > echo% time:~0,-3%

22:41:19

D:\ > echo% time:~,-3%

22:41:26

D:\ > echo% time:~0,2%

twenty-two

D:\ > set axiom 12345678

D:\ > echo% aVludlu 5mai 1%

4567

D:\ > echo% aVlu 5mai 2%

four hundred and fifty six

D:\ > echo% a _ r _ r

ECHO is open.

D:\ > echo% aMUR 5MARIMULI 6%

ECHO is open.

D:\ > echo% aVuzuki 5 mai Mui 4%

four

This is the end of the article on "what is the meaning of% time:~0,2% in dos". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Characters variables length offset meaning two articles three that is numeric values numbers more format status environment posts help relevant good practical Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Redmi Apple MySQL Huawei