中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-08 15:27
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 取当前剪辑板的文件大小 查看 687 回复 5
楼 主 取当前剪辑板的文件大小 发表于 2008-05-22 19:23 ·  中国 福建 厦门 电信
初级用户
积分 28
发帖 11
注册 2008-01-08 17:35
18年会员
UID 108004
性别 男
状态 离线
在文件被复制后,能否取出当前被复制的文件大小?
2 发表于 2008-05-22 20:31 ·  中国 重庆 电信
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
为什么不在复制之前判断呢?
3 发表于 2008-05-22 20:41 ·  中国 福建 厦门 电信
初级用户
积分 28
发帖 11
注册 2008-01-08 17:35
18年会员
UID 108004
性别 男
状态 离线
都可以,就是不知道该怎么处理?
4 发表于 2008-05-22 20:43 ·  中国 重庆 电信
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
for /?
%~I - expands %I removing any surrounding quotes (")
%~fI - expands %I to a fully qualified path name
%~dI - expands %I to a drive letter only
%~pI - expands %I to a path only
%~nI - expands %I to a file name only
%~xI - expands %I to a file extension only
%~sI - expanded path contains short names only
%~aI - expands %I to file attributes of file
%~tI - expands %I to date/time of file
%~zI - expands %I to size of file
%~$PATH:I - searches the directories listed in the PATH
environment variable and expands %I to the
fully qualified name of the first one found.
If the environment variable name is not
defined or the file is not found by the
search, then this modifier expands to the
empty string
5 发表于 2008-05-22 21:25 ·  中国 福建 厦门 电信
初级用户
积分 28
发帖 11
注册 2008-01-08 17:35
18年会员
UID 108004
性别 男
状态 离线
谢谢您!很多命令我都不理解.但我会慢慢消化的。
能不能先告诉我怎么用法?
6 发表于 2008-05-22 21:30 ·  中国 重庆 电信
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
@echo off
for %%a in (C:\test\*.txt) do echo 文件%%a的大小是:%%~zaB
论坛跳转: