Command line: dir file whose file size exceeds 1024 KB

I am currently using the following command to find out how many pdf documents exist where there is a full path, but it displays a list of 11,000 documents,

dir *.pdf /s /b**

I would like to specify only those images that are larger than 1024 KB, the file size should not be displayed, but the file size should be larger than 1024 KB.

perhaps using the command line?

+3
source share
1 answer

Since you are using windows, most likely powershell :

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

ls .pdf. where-object 1 . format-table

+5

All Articles