Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/BOfH-666/Get-FolderInfo
Show the total size of a given folder, its sub folder count and its file count utilizing robocopy to make it blazing fast
https://github.com/BOfH-666/Get-FolderInfo
Last synced: 11 days ago
JSON representation
Show the total size of a given folder, its sub folder count and its file count utilizing robocopy to make it blazing fast
- Host: GitHub
- URL: https://github.com/BOfH-666/Get-FolderInfo
- Owner: BOfH-666
- Created: 2019-11-27T00:13:32.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-21T01:14:52.000Z (almost 4 years ago)
- Last Synced: 2024-08-02T05:22:58.815Z (3 months ago)
- Language: PowerShell
- Size: 14.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-blazingly-fast - Get-FolderInfo - Show the total size of a given folder, its sub folder count and its file count utilizing robocopy to make it blazing fast (PowerShell)
README
# Get-FolderInfo
**.SYNOPSIS**
Displays basic folder info.
**.DESCRIPTION**
This function shows the file and subfolder count as well as the total size in bytes and in human readable formats. The property "Size" is a string property for human convenience. It cannot be used for calculating or sorting purposses. Therefor you can use the property "Bytes".
**.PARAMETER Path**
The folder path to show the info for.
**.EXAMPLE**```Powershell
PS C:\> Get-FolderInfo
```
This command will show the information about the current working directory.
**.EXAMPLE**```Powershell
PS C:\> Get-ChildItem -Path $env:USERPROFILE -Directory |
>>> Get-FolderInfo |
>>> Sort-Object -Property Bytes -Descending
```
This command will show the information about all subfolders of the documents folder of the currently logged on user sorted by total size of the folder contents.
**.EXAMPLE**```Powershell
PS C:\> Get-FolderInfo -Path D:\Files\Documents, D:\Files\Backup
```
This command will show the information about the two specified folders.
**.INPUTS**
System.IO.DirectoryInfo
**.OUTPUTS**
FolderInfo
**.NOTES**
Author: O.Soyk
Date: 20210118
(To improve the performance of the function it utilizes the MS Windows command line tool Robocopy)
**.LINK**
http://social.technet.microsoft.com/wiki/contents/articles/1073.robocopy-and-a-few-examples.aspx
**.LINK**
https://technet.microsoft.com/en-us/library/cc733145(v=ws.10).aspx