Windows command for file size only

后端 未结 12 1973
死守一世寂寞
死守一世寂寞 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:29

    C:\>FORFILES  /C "cmd /c echo @fname @fsize"
    
    
    C:\>FORFILES  /?
    
    FORFILES [/P pathname] [/M searchmask] [/S]
             [/C command] [/D [+ | -] {MM/dd/yyyy | dd}]
    
    Description:
        Selects a file (or set of files) and executes a
        command on that file. This is helpful for batch jobs.
    
    Parameter List:
        /P    pathname      Indicates the path to start searching.
                            The default folder is the current working
                            directory (.).
    

提交回复
热议问题