This PowerShell module allow you to generate disk usage statistics.
The result will appear in the console and also in the OUTPATH
folder as a PoshDirSize_{yyyy-MM-dd-HH-mm-ss}.log
file.
WIP
Get-PoshDirSize [-PoshDSPath] <string> [-PoshDSOutPath] <string> [-PoshDSMode {Fast | Slow}] [-PoshDSFileInc <string[]>] [-PoshDSFileExc <string[]>] [-PoshDSDirInc <string[]>] [-PoshDSDirExc <string[]>] [<CommonParameters>]
Get-PoshDirSize [-PoshDSPath] <string> [-PoshDSOutPath] <string> [-PoshDSMode {Fast | Slow}] [-LongPath] [<CommonParameters>]
Get-PoshDirSize PATH OUTPATH
PoshDSMode
= Default value is alwaysFast
.Fast
: Faster, but more resource intensive. (foreach
)Slow
: Slower, but more resource efficient. (ForEach-Object
)
PoshDSFileInc
= Include files based on name and file format.- Example:
*.log, *.txt
orDailyReport*.csv
- Example:
PoshDSFileExc
= Exclude files based on name and file format.PoshDSDirInc
= Include dirs based on name.- Example:
System32, Users
or2022*Pics
- Example:
PoshDSDirExc
= Exclude dirs based on name.LongPath
= Include and correctly parse long paths.
$PoshDSRunTime
= You can configure the date format modifying theyyyy-MM-dd-HH-mm-ss
section inside the module code.
- Generate some kind of chart 💹📊
- Faster file writer (.NET StreamWriter)
- Log: Extend the summary with data from new variables
- Param: Switch for console output (enable/disable)
- Param: OutPath
- Param: OutFile, multiple naming format
- Search: Handle long paths
- Search: Handle long paths (UNC)
- Search: Logic if directory / directories are excluded #2
- Search: Switch between Path and LiteralPath #3
- Search: Minimum and maximum file size
- Search: Include/exclude files based on name and file format
- Search: Include/exclude dirs based on name
- Search: Depth
- Search: Switch between fast/resource saving mode (partly done) ⚡/🌳
- Refactor code into a nice PS module 👀
- GitHub Actions
- Version
- Build
- Test
- Publish
- Set WindowsTitle at start
- Param: OutPath
- Search: Include/exclude files based on name and file format
- Search: Include/exclude dirs based on name
- Wrong variable type for include / exclude variables #1
- Search: Handle long paths
- Log: Extend the summary with data from new variables
- Search: Switch between Path and LiteralPath #3
- Refactored into a PS module
- Added Fast/Slow mode (partly done)
- Added some verbose logging
- Escape special chars in path strings
- Added output mode to console and .log file
- Basic functionality
PoshDirSize is licensed under the MIT License.