Looking for a tool that may or may/not exist. Loo...
# _general
j
Looking for a tool that may or may/not exist. Looking for a program that can index a network file share for folders only to a specified depth. Anyone have any recommendations? I have tried Everything, but it crashes with the sheer amount of data and structures stored. Thanks all.
j
Have you got Treesize Pro? I'm sure that had some command line options like TreeSize.exe /SCAN "C:\Data" /EXPAND 2
🙌 1
🙌🏼 1
j
I'll check that out, I do use that for checking fslogix, so may try that for upm as well. Testing out locate32 right now. It allows you to create an index, then interact through that DB instead of slow arse windows cifs.
g
I have WSL and would use the find command. But it looks like PSH has similar functionality...
Copy code
Get-ChildItem -Path "C:\Your\Directory\Path" -Recurse -Depth 2
j
Copilot to the rescue. # Set the root of the network share $networkShare = "\\server\share" # <-- Replace with your network path # CSV output path $outputCsv = "FolderList.csv" # Collect second-level folders and their parents $results = @() # Get first-level folders $topLevelFolders = Get-ChildItem -Path $networkShare -Directory -ErrorAction SilentlyContinue foreach ($topFolder in $topLevelFolders) { $subFolders = Get-ChildItem -Path $topFolder.FullName -Directory -ErrorAction SilentlyContinue foreach ($subFolder in $subFolders) { $results += [PSCustomObject]@{ TopLevelFolder = $topFolder.FullName SecondLevelFolder = $subFolder.FullName } } } # Export to CSV $results | Export-Csv -Path $outputCsv -NoTypeInformation -Encoding UTF8 Write-Host "Results exported to $outputCsv"
j
Just don't ask it to review a book
😂 2
j
First time it actually generated code that worked out the gate