CMD shell中的可用空间 [英] Free space in a CMD shell
问题描述
有没有办法获取磁盘或CMD
中的文件夹的空闲磁盘空间量,而无需安装一些第三方应用程序?
Is there a way to get the amount of free diskspace of a disk or a folder in a CMD without having to install some thirdparty applications?
我有一个CMD将一个大文件复制到给定的目录,当然可以使用
从复制命令返回errorlevel,但是我必须等待的时间
它需要复制文件例如...到磁盘已满,复制操作失败)。
I have a CMD that copies a big file to a given directory and could of course use the errorlevel return from the copy command, but then I have to wait for the time it takes to copy the file (eg...to that then the disk is full and the copy operation fails).
我想知道在我开始复制之前,如果它是任何想法。
I would like to know before I start the copy if it is any idea at all. Tried the DU.EXE utility from Sysinternals, but that show occupied space only.
推荐答案
如果运行 dir c:\
,最后一行将为您提供可用的磁盘空间。
If you run "dir c:\
", the last line will give you the free disk space.
更好的解决方案: fsutil volume diskfree c:
这篇关于CMD shell中的可用空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!