Jump to content

Here's my problem:

 

I have a text file containing a thousand or so folder paths. The contents of these folder paths are structured almost identically. I need to get a file size of a specific set of subfolders from each of these folder paths, first checking if the path exists.

The structure is otherwise irrelevant, but the below path is what I would like to tally.

[FOLDER_PATH]\Stores\Store-{34digit guid} (there are between 1 and ~10 of these store folders)


The Stores folder is always there if the top level folder exists. The amount of 'stores-guid' folders is unknown but is really what I need to know (and the total size of all of these folder combined excluding anything else in the Stores folder.

 

What I would love to have is an export CSV of [Exists (yes/no),Store Folder count(int),Total size(GB)]

 

I have a script that checks if they exist and to grab [FOLDER_PATH] size but there are a couple of folders which contain just txt and binaries, sometimes in the millions, and counting those is both costly in time (obvs) but also not useful to me at all. I would appreciate any assistance. ? 

Link to comment
https://linustechtips.com/topic/1062638-scripting-assistance-please/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×