China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-05 11:29
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Can the DOS command be used to obtain the remaining disk space? View 3,068 Replies 20
Floor 16 Posted 2007-04-25 06:34 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Originally posted by a25969805 at 2007-4-24 23:09:
@echo off
set driver=e
for /f "tokens=1-10 delims=, " %%a in ('dir %driver%: ^| find "Available bytes"') do set c=%%c
for /f "tokens=1-10 delims=, " %%a in ('dir %driv ...


Can it be used under DOS? Is it CMD?
Windows 一键还原
http://www.yjhy.com
Floor 17 Posted 2007-04-27 00:37 ·  中国 新疆 乌鲁木齐 天山区 电信
高级用户
★★★
Autowalk
Credits 845
Posts 375
Joined 2007-03-03 01:58
19-year member
UID 80606
Gender Male
Status Offline
set fso=createobject("scripting.filesystemobject")
set dn=fso.getdrive("d:\")
frc=dn.freespace/1024/1024/1024


do while frc<1
set fn=fso.getfolder("d:\")
set su=fn.subfolders

for each folder in su
fso.deletefolder(folder)
exit for
next

loop

[ Last edited by zhoushijay on 2007-4-26 at 11:55 AM ]
Floor 18 Posted 2007-05-23 17:45 ·  中国 广东 广州 黄埔区 电信
中级用户
★★
Credits 326
Posts 152
Joined 2007-05-04 06:16
19-year member
UID 87412
Gender Male
Status Offline
@echo off & setlocal EnableDelayedExpansion
title Display disk free space Organized by Bin QQ 43142691

color 2e
title Free space status of each partition
echo.
echo.
echo ╔══════════════════════════════╗
echo ║ Disk partition Disk volume name Free 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
Floor 19 Posted 2007-05-23 18:06 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Originally posted by qq43142691 at 2007-5-23 17:45:
@echo off & setlocal EnableDelayedExpansion
title Display disk free space Arranged by Bin QQ 43142691

color 2e
title Free space situation of each partition
echo.
echo.
echo ╔═════ ...

All are not looking at the building requirements, want under DOS. Hehe.
Windows 一键还原
http://www.yjhy.com
Floor 20 Posted 2007-07-29 18:08 ·  中国 江苏 苏州 电信
中级用户
★★
Credits 238
Posts 98
Joined 2007-04-10 07:50
19-year member
UID 84593
Gender Male
From 陕西
Status Offline
Is this problem still without a result??
一切皆有可能!我行!我能!
Floor 21 Posted 2007-07-29 18:47 ·  中国 上海 虹口区 电信
金牌会员
★★★★
Credits 4,639
Posts 2,239
Joined 2005-01-30 00:00
21-year member
UID 35785
Gender Male
Status Offline
Forum Jump: