
+ ConvertTo-Zip, originally created to mass convert CBRs to CBZs It will only be avilable when 7-zip is available (7z executable) Features: Shows progress, can work recursively (preserving folder structure), knows to move completed files. + Show-Progress: Shorthand for common progress related output manipulation (calculation of completion based on time, or item count, and verbose output if needeed) + ConvertFrom-TimeSpan: string output from timespan, used by Show-Progress + Get-Path updated to be more efficient (no need for exception handling) + PathProcessingFunctions loads a utility function GetShellSafePath * Repair-Permissions added some status reporting
15 lines
424 B
PowerShell
15 lines
424 B
PowerShell
param([TimeSpan]$TimeSpan, [switch]$NoSeconds)
|
|
$local:out = [string]::Empty
|
|
if( $TimeSpan.Days ) {
|
|
$out = "$($TimeSpan.Days)d "
|
|
}
|
|
if( $out -or $TimeSpan.Hours ) {
|
|
$out += "$($TimeSpan.Hours)h "
|
|
}
|
|
if( $out -or $TimeSpan.Minutes -or ($NoSeconds -and -not $out) ) {
|
|
$out += "$($TimeSpan.Minutes)m "
|
|
}
|
|
if( -not $NoSeconds -and ($TimeSpan.Seconds -or -not $out) ) {
|
|
$out += "$($TimeSpan.Seconds)s"
|
|
}
|
|
$out.Trim();
|