Hi All,
i’m trying to export a list of folders in a directory, and then count the amount of characters that makes up the folder structure. I can’t seem to get the export-csv to work.
I need to export a csv with the fullname which is the full path of the directory, and then next to it the length (character count). Any help is appreciated!
Get-ChildItem -Recurse -directory -Path "path of folder to start from" | Select-Object fullname | export-csv "export path"
$folders = Import-Csv "exported csv"
ForEach ($folder in $folders)
{
$folder, $folder.fullname.length | export-csv "result csv"
}