![]() |
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-15 12:27 |
47,813 topics / 349,903 posts / today 1 new / 48,257 members |
| DOS疑难解答 & 问题讨论 (解答室) » A small issue with cleverly using lmod in batch files to read file information |
| Printable Version 2,107 / 1 |
| Floor1 jszforms | Posted 2009-02-06 16:14 |
| 初级用户 Posts 13 Credits 27 | |
|
For convenience in testing, edit.com is used in place of winxpsp3.gho for testing.
Among them, the result of LMODEXp6.BAT is a little different from the free space shown by dir, and I don't know what's going on. lmodexp1.bat vol | lmod /L1 set label=[$!] >labelexp.bat call labelexp.bat echo The detected volume label of this partition is %label% LMODEXp2.BAT dir edit.com | lmod /L5 set filedate=[29,25] >filedate.bat call filedate.bat echo The detected time of the last system backup is %filedate% LMODEXp3.BAT dir edit.com | lmod /L5 set filedate=The detected time of the last system backup is [29,25] >filedate.bat call filedate.bat echo %filedate% LMODEXp4.BAT dir edit.com | lmod /L5 set filename= [1,8].[10,3] >filename.bat call filename.bat echo The detected name of the last system backup is %filename% LMODEXp5.BAT dir edit.com | lmod /L5 set filesize=[13,16] >filesize.bat call filesize.bat echo The detected size of the last system backup is %filesize% bytes LMODEXp6.BAT dir edit.com | lmod /L8 set freesize=[18,17] >freesize.bat call freesize.bat echo The detected free space of the current partition is %freesize% bytes Attachments study.rar (3.05 KiB) |
|
| Floor2 qqqrun3 | Posted 2010-11-09 19:15 |
| 初级用户 Posts 28 Credits 59 | |
|
Long live, long long live
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |