To build on the previous answer. You can use wmic datafile
to get info about a file, but you have to provide the full path and double-up your slashes like so
wmic datafile where Name="F:\\anyfile.txt"
This gives an unreadable mess in the console, as you'll see:
However if you pipe this into a text file, it's pretty legible
wmic datafile where Name="F:\\anyfile.txt" >> fileprops.txt
Fortunately, wmic
can format the info as a list, and then it is actually pretty useful.
wmic datafile where Name="F:\\anyfile.txt" list /format:list
You can then provide these properties only for a simplified view, note that you must remove the list
keyword.
>wmic datafile where Name="G:\\ipcamera.log" get Hidden,FileSize,Name /format:list
FileSize=20
Hidden=FALSE
Name=G:\ipcamera.log
A little piece of trivia, wmic was the foundation for what eventually became PowerShell!