I need to monitor a folder in windows Server. This folder gets updated every time. I need to get the size of the file and file name inside this folder - Just by running a script.
You can do this from the command line like this:
You can also pass in a file mask to get a listing for more than one file:
Will display the size, file name of each .DOC file.
Use below line to display size of all the files as well as file name inside a directory.
You can also use powershell
you retive all files in the directory with the following attributes:
If you need only the filename and the size you can use