How to get the size of the file using Get-ItemProperty in powershell!

(Dinesh) #1


I have a file having data around 5GB. I tried to get size of the file using get-content $path2 | Measure-Object method. But its taking more time as Get-Content cmdlet is present.

Is there method to get the size of this kind of file very quickly. I would like to get the file size using Properties of a file using Get-ItemProperty.

Can anyone suggest me on this,


(Robert) #3

Hi Dinesh,
This sounds like a PowerShell question and not one specifically about Octopus Deploy. We cannot provide one on one support for questions like this that our product is not involved with. There are many search results if you google for something like “Get file size in powershell”. Here is one example

Please let us know if you have any further questions regarding your usage of Octopus Deploy.