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
Try forfiles:
forfiles /p C:\Temp /m file1.txt /c "cmd /c echo @fsize"
The forfiles command runs command c for each file m in directory p.
The variable @fsize is replaced with the size of each file.
If the file C:\Temp\file1.txt is 27 bytes, forfiles runs this command:
cmd /c echo 27
Which prints 27 to the screen.
As a side-effect, it clears your screen as if you had run the cls command.