Windows command for file size only

后端 未结 12 1916
死守一世寂寞
死守一世寂寞 2020-11-27 16:12

Is there a Windows command that will output the size in bytes of a specified file like this?

> filesize test.jpg
65212

I know that the d

12条回答
  •  温柔的废话
    2020-11-27 16:27

    This is not exactly what you were asking about and it can only be used from the command line (and may be useless in a batch file), but one quick way to check file size is just to use dir:

    > dir Microsoft.WindowsAzure.Storage.xml
    

    Results in:

    Directory of C:\PathToTheFile
    
    08/10/2015  10:57 AM         2,905,897 Microsoft.WindowsAzure.Storage.xml
                   1 File(s)      2,905,897 bytes
                   0 Dir(s)  759,192,064,000 bytes free
    

提交回复
热议问题