1

I would like to calculate the total size of all files in a given directory that fulfil the condition:

  • The path of the file (or, equally good, the directory of the file) contains the string DEV_

The operating system is Windows Server 2012.

2
  • What have you tried?
    – harrymc
    Feb 21, 2022 at 16:49
  • I have tried to google this, but was not able to find an approach. I thought about coding the whole thing in Java (which is not very hard), but hoped that one can do it more directly. Feb 21, 2022 at 16:53

1 Answer 1

1

Use PowerShell while this folder is the current:

Get-ChildItem * -Filter *DEV_* | Measure-Object -Sum Length

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .