This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$targetfolder='C:\Windows' | |
$dataColl = @() | |
gci -force $targetfolder -ErrorAction SilentlyContinue | ? { $_ -is [io.directoryinfo] } | % { | |
$len = 0 | |
gci -recurse -force $_.fullname -ErrorAction SilentlyContinue | % { $len += $_.length } | |
$filesCount = (gci -recurse -force $_.fullname -File -ErrorAction SilentlyContinue | Measure-Object).Count | |
$dataObject = New-Object PSObject -Property @{ | |
Folder = $_.fullname | |
SizeGb = ('{0:N3}' -f ($len / 1Gb)) -as [single] | |
filesCount=$filesCount |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
####################### | |
#### Author: Matt Curry | |
#### Date 07/08/24 | |
#### Adds Colors to mac shell, so you can see the difference between directories/files/etc... | |
####################### | |
# or for .profile | |
echo " " >> ~/.profile | |
echo "# Mac Color Fix" >> ~/.profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ensure the script exits on error | |
set -e | |
# Function to check if a command exists | |
function command_exists() { | |
command -v "$1" &> /dev/null | |
} |
OlderNewer