Hello Powershell Expert,
I have a question on how to write folder names to external text files based on their total size. Suppose there are lots of folders in a parent folder and I’d like to write all these subfolders’ names to text files; in each text files, the total size of all the folders listed there should be less thanÂ Â a fix amount of size, for example, 4GB.
To make it clear, think about a simple case: suppose there are 4 subfolders in a parent folder, C:\
with size 1G, 3.5G, 1G, 1G respectively. We know subfolder C:\b can’t be grouped with any others otherwise their total size will be more than 4GB. So, we can write all these subfolders’ namesÂ sequentiallyÂ to 3 text files :
How can I make it? Thanks very much!