How to display the remaining space and used space of partitions in pure DOS, that is, under pure DOS 7.1 or DOS 6.22, not in the DOS window of XP, using batch processing? Including FAT32 partitions and NTFS partitions. Which expert or master can do it?
I know that in the DOS of XP, it can be like this:
@echo off
cls
setlocal EnableDelayedExpansion
echo.
echo.
echo ╔══════════════════════════════╗
echo ║ Disk Partitions Disk Volume Name Remaining Space (MB) ║
echo ║ _____________________________________________________ ║
for %%d in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
if exist %%d:\nul (
for /f "tokens=3" %%z in ('dir /-c %%d:\') do set freesize=%%z
set /a freesize=!freesize:~0,-3!/1049>nul
set freesize= !freesize!
set freesize=!freesize:~-9!
for /f "tokens=3*" %%v in ('vol %%d:') do set volume=%%w
set volume= !volume!
set volume=!volume:~-20!
echo ║ %%d: !volume! !freesize! ║
)
)
echo ╚══════════════════════════════╝
pause>nul
[ Last edited by sanxiao88 on 2008-11-5 at 20:55 ]


