diff --git a/scripts/cd-repos.ps1 b/scripts/cd-repos.ps1 index cbcd3e0e..b5b592e3 100755 --- a/scripts/cd-repos.ps1 +++ b/scripts/cd-repos.ps1 @@ -29,7 +29,7 @@ try { $path = Resolve-Path $path Set-Location "$path" $subfolders = Get-ChildItem $path -attributes Directory - "📂$path entered, containing $($subfolders.Count) subfolders." + "📂$path entered (has $($subfolders.Count) subfolders)." exit 0 # success } catch { "⚠️ Error: $($Error[0])" diff --git a/scripts/cd-scripts.ps1 b/scripts/cd-scripts.ps1 index 68bb4831..6e52fa74 100755 --- a/scripts/cd-scripts.ps1 +++ b/scripts/cd-scripts.ps1 @@ -16,7 +16,7 @@ try { $path = Resolve-Path "$PSScriptRoot" if (-not(Test-Path "$path" -pathType container)) { throw "PowerShell scripts folder at 📂$path doesn't exist (yet)" } $files = Get-ChildItem $path -attributes !Directory - "📂$path entered, containing $($files.Count) scripts." + "📂$path entered (has $($files.Count) scripts)." Set-Location "$path" exit 0 # success } catch { diff --git a/scripts/new-junction.ps1 b/scripts/new-junction.ps1 index 17262529..2458792d 100755 --- a/scripts/new-junction.ps1 +++ b/scripts/new-junction.ps1 @@ -9,7 +9,7 @@ Specifies the path to the target directory .EXAMPLE PS> ./new-junction.ps1 C:\User\Joe\D_drive D: - ✅ Created a new junction 'C:\User\Joe\D_drive', linking to 📂D: + ✅ New junction 'C:\User\Joe\D_drive' created, linking to: 📂D: .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -19,13 +19,13 @@ param([string]$junction = "", [string]$targetDir = "") try { - if ($junction -eq "" ) { $symlink = Read-Host "Enter path and filename of the new junction" } - if ($targetDir -eq "" ) { $target = Read-Host "Enter the path to the target directory" } + if ($junction -eq "" ) { $junction = Read-Host "Enter the new junction's path and filename" } + if ($targetDir -eq "" ) { $target = Read-Host "Enter the path to the target directory " } - New-Item -path "$symlink" -itemType Junction -value "$targetDir" + New-Item -path "$junction" -itemType Junction -value "$targetDir" if ($lastExitCode -ne 0) { throw "Command 'New-Item' has failed" } - "✅ Created a new junction '$symlink', linking to 📂$targetDir" + "✅ New junction '$junction' created, linking to: 📂$targetDir" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"