windows - 命令提示符 : dir file whose File size is greater than 1024KB

标签 windows list command prompt

我目前正在使用以下命令找出有多少 pdf 格式的文档以及完整的路径,但它显示了大约 11,000 个文档的列表,

dir *.pdf /s /b**

我只想列出那些文件大小大于 1024KB 的图像,不应显示文件大小,但文件大小应大于 1024KB。

可以使用命令提示符吗?

最佳答案

由于您使用的是 Windows,因此您很可能拥有 powershell :

ls *.pdf | where-object {$_.length -gt 1048576} | format-table -property Name

ls 将列出扩展名为 .pdf 的文件。 where-object 会将结果集过滤为长度大于 1MB (1048576 = 1MB) 的文件。 format-table 将格式化最终输出以仅显示文件名

关于windows - 命令提示符 : dir file whose File size is greater than 1024KB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10234817/

相关文章:

windows - 将 Windows 应用程序作为服务运行?

java - 获取列表中特定字符串的最后一次出现

C# cosmos 文件 IO 和目录

c - UNIX shell C 管道的执行

windows - 从用户模式访问内核内存 (Windows)

python - 如何从 Python (2.7) 中生成的进程中删除 Windows 控制台?

list - python 帮助从列表中提取值

c - 释放链表中的节点

linux -/usr/bin/时间 : No such file or directory

windows - 延长 Windows 应用程序的证书过期日期