中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-10 15:18
47,811 topics / 349,897 posts / today 0 new / 48,255 members
DOS疑难解答 & 问题讨论 (解答室) » The syntax and function of STRINGS. Please comment from everyone. Hehe!
Printable Version  7,178 / 15
Floor1 insert Posted 2004-11-10 00:00
中级用户 Posts 52 Credits 282
Last time, with the guidance of Climbing, I finally understood the powerful functions of STRINGS. I don't have an English dictionary at hand, so I can only rely on translation software to finally figure out the usage of some sub - commands of STRINGS. Please see the following introduction specifically. Since I don't understand English, if there are any errors or omissions, please help point them out and supplement them. Thank you!!

STRINGS is a very good batch processing enhancement tool. It has many functions, such as character operations, file operations, memory operations, etc., and can output values to target variables. You can enter STRINGS /? in the DOS prompt to view all its usage parameters.

STRINGS/? (View the list of sub - commands of STRINGS)

The following is the list of sub - commands of STRINGS:

LEFT RIGHT MID LENGTH FIND FINDC
LOWER UPPER CHAR VAL FILEDRIVE FILEDIR
FILENAME FILEEXT PARSE ADDCOMMAS REPEAT READ
WRITE FILESIZE LINESIZE TRUENAME FILEDATE FILETIME
VER ASK INWIN 2FCHECK ENVFREE ENVSIZE
MASTERVAR LOCALVAR TRUEVER FILES LASTDRIVE CODEPAGE
COUNTRY BIOSDATE GETKEY LOCALENV MASTERENV ADD
SUB MUL DIV AND OR XOR
NOT CONVERT PEEK POKE IN OUT
INTERRUPT SCAN DAY MONTH DATE TIME
MEMTOTAL MEMFREE XMSTOTAL XMSFREE XMSVER EMSTOTAL
EMSFREE EMSVER UMBLARGE STRINGSVER INSTALLED HELP

To view the help of a specific command, please enter: STRINGS HELP sub - command
For example: STRINGS HELP LEFT (will display the detailed usage of the LEFT sub - command)

The following are their detailed grammars and functions. The content in 〈〉 is the description of the function.

1. STRINGS LEFT source string number of characters to take 〈Take the specified number of characters from the left of the source string〉
2. STRINGS RIGHT source string number of characters to take 〈Take the specified number of characters from the right of the source string〉
3. STRINGS MID source string start number, end number 〈Take from the middle of the source string〉
4. STRINGS LENGTH source string 〈Return the character length of the source string〉
5. STRINGS FIND source string character 〈Find the specified character from the source character〉
6. STRINGS FINDC source string character 〈Find the specified character from the source character, case - sensitive〉
7. STRINGS LOWER source string 〈Convert the uppercase letters in the source string to lowercase letters〉
8. STRINGS UPPER source string 〈Convert the lowercase letters in the source string to uppercase letters〉
9. STRINGS CHAR character ... 〈Convert characters to ASCII numbers〉
10. STRINGS VAL number ... 〈Convert numbers to ASCII characters〉
11. STRINGS FILEDRIVE file name 〈Return the drive letter where the file name is located〉
12. STRINGS FILEDIR file name 〈Return the directory where the file name is located〉
13. STRINGS FILENAME source file name 〈Return the file name of the source file name, without the extension〉
14. STRINGS FILEEXT source file name 〈Only return the extension of the source file name〉
15. STRINGS ADDCOMMAS number 〈Separate the number with commas every three digits〉
16. STRINGS REPEAT number of repetitions, character or number 〈Repeat the character or number as specified〉
17. STRINGS READ file name, number of lines 〈Read the content of the specified number of lines in the file〉
18. STRINGS WRITE file name, character 〈Append the character to the file〉
19. STRINGS FILESIZE file name 〈Return the size of the file〉
20. STRINGS LINESIZE file name 〈Return the total number of lines of the file content〉
21. STRINGS TRUENAME file name 〈Return the complete path of the file〉
22. STRINGS FILEDATE file name 〈Return the modification date of the file〉
23. STRINGS FILETIME file name 〈Return the modification time of the file〉
24. STRINGS VER 〈Return the DOS version number of the current system〉
25. STRINGS ASK prompt string 〈Dialogue〉
26. STRINGS INWIN 〈Return 1 if running in the DOS window in WINDOWS〉
27. STRINGS ENVFREE 〈Return the free bytes of the environment variable space〉
28. STRINGS ENVSIZE 〈Return the total size of the environment variable space〉
29. STRINGS TRUEVER 〈Return the true version number of the current DOS〉
30. STRINGS FILES 〈Return the number of files accessed simultaneously at present〉
31. STRINGS LASTDRIVE 〈Return the last valid drive letter that the current system can access〉
32. STRINGS CODEPAGE 〈Return the active long file code page of the current system〉
33. STRINGS COUNTRY 〈Return the country code set by the current system〉
34. STRINGS BIOSDATE 〈Return the date of BIOS factory setting〉
35. STRINGS GETKEY 〈Return the ASCII code of the key pressed〉
36. STRINGS ADD number 1, number 2 ... 〈Perform + operation on numbers〉
37. STRINGS SUB number 1, number 2 ... 〈Perform - operation on numbers〉
38. STRINGS MUL number 1, number 2 ... 〈Perform × operation on numbers〉
39. STRINGS DIV number 1, number 2 ... 〈Perform ÷ operation on numbers〉
40. STRINGS AND number 1, number 2 ... 〈Perform "logical AND" operation on numbers〉
41. STRINGS OR number 1, number 2 ... 〈Perform "logical OR" operation on numbers〉
42. STRINGS NOT number 1, number 2 ... 〈Perform "logical NOT" operation on numbers〉
43. STRINGS MEMTOTAL 〈Return the total size of the conventional memory of the system〉
44. STRINGS MEMFREE 〈Return the free size of the conventional memory of the system〉
45. STRINGS XMSTOTAL 〈Return the total size of the extended memory of the system〉
46. STRINGS XMSFREE 〈Return the free size of the extended memory of the system〉
47. STRINGS XMSVER 〈Return the version number of the driver program used by the current extended memory〉
48. STRINGS EMSTOTAL 〈Return the total size of the expanded memory of the system〉
49. STRINGS EMSFREE 〈Return the free size of the expanded memory of the system〉
50. STRINGS EMSVER 〈Return the version number of the driver program used by the current expanded memory〉
51. STRINGS STRINGSVER 〈Return the version number of STRINGS〉

The following are the sub - commands that I haven't understood yet. Please supplement their functions if anyone knows. Thank you!!

PARSE 2FCHECK MASTERVAR LOCALVAR LOCALENV MASTERENV XOR
CONVERT PEEK POKE IN OUT INTERRUPT SCAN
DAY MONTH DATE TIME UMBLARGE INSTALLED

Thank you again, Climbing! Everyone who likes it should give a thumbs up! Hehe!!!
Floor2 qzwqzw Posted 2004-11-11 00:00
银牌会员 Posts 636 Credits 2,343
Yeah, it's a great thing, but unfortunately it's not very useful. Still, I have to give it a thumbs up!
Floor3 Climbing Posted 2004-11-12 00:00
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
That's a good translation. Give it a thumbs up!
Floor4 xztw Posted 2006-08-20 15:27
初级用户 Posts 8 Credits 20
Correction:
9. STRINGS [target variable=]CHAR number [number1] [number2]... 〈Convert number to ASCII character〉
10. STRINGS [target variable=]VAL character [character1] [character2]... 〈Convert character to ASCII number〉
Floor5 lizaoyou Posted 2007-02-07 05:37
中级用户 Posts 85 Credits 210 From 广东广州
Bump up! The character processing ability of pure DOS is relatively weak, and STRINGS can be used as a very good enhancement tool.

STRINGS [variable=] PARSE source string, segment number, delimiter
Returns the character segment with the specified number and delimited by the delimiter
For example: STRINGS PARSE 2007-02-06, 2, - returns 02
Floor6 6622186 Posted 2007-03-09 02:55
高级用户 Posts 411 Credits 894
Not quite understand, but since I've read it, I should give it a thumbs up.
Floor7 starrysky Posted 2007-05-28 16:30
新手上路 Posts 5 Credits 10
Thanks to the LZ, looking for the download of STRINGS
Floor8 chishingchan Posted 2007-06-05 22:29
银牌会员 Posts 538 Credits 1,284
Can you give an example to illustrate how to use it?
Floor9 gmy Posted 2007-06-05 22:47
版主 Posts 392 Credits 1,113
Support
Floor10 lxmxn Posted 2007-06-05 22:55
版主 Posts 4,938 Credits 11,386
That's a good translation. I'll also come to support.
Floor11 lpic2003 Posted 2007-07-05 21:32
新手上路 Posts 6 Credits 11
Thanks
Floor12 bd123456789 Posted 2007-07-06 20:53
中级用户 Posts 216 Credits 360
Great.

But why can't I use this command in my DOS or CMD? Is my version too low, and which command can I use to check?

Additionally, which are the enhanced commands in CMD, and how to install them?

[ Last edited by bd123456789 on 2007-7-6 at 08:55 PM ]
Floor13 gahyga Posted 2008-01-07 15:15
新手上路 Posts 1 Credits 2
Good stuff, the younger brother just happened to use it, thank you
Floor14 dslz666 Posted 2008-03-25 12:20
中级用户 Posts 117 Credits 233
Thanks, finally found the help file
Floor15 prodigall Posted 2008-05-06 18:22
初级用户 Posts 36 Credits 80
Useful
Top it up
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023