Update the cd-* scripts

This commit is contained in:
Markus Fleschutz 2021-09-12 22:04:38 +02:00
parent 439387b735
commit cb35d425c5
18 changed files with 19 additions and 19 deletions

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "$HOME/Desktop"
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the desktop folder at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "$HOME/Documents"
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the user's documents folder at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "$HOME/Downloads"
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the user's downloads folder at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "$HOME/Dropbox"
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the user's Dropbox folder at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "$HOME"
if (-not(test-path "$TargetDir" -pathType container)) {
write-error "Home directory 📂$TargetDir does not exist"
write-warning "Sorry, the user's home directory at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "$HOME/Music"
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the user's music folder at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "$HOME/OneDrive"
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the user's OneDrive folder 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "$HOME/Pictures"
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the user's pictures folder at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -19,7 +19,7 @@ function Get-CurrentUserSID { [CmdletBinding()] param()
$TargetDir = 'C:\$Recycle.Bin\' + "$(Get-CurrentUserSID)"
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the user's recycle bin folder at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "$HOME/Repos"
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the user's Git repositories folder at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -17,7 +17,7 @@ if ($IsLinux) {
$TargetDir = resolve-path "C:/"
}
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the root directory at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -2,7 +2,7 @@
.SYNOPSIS
cd-scripts.ps1
.DESCRIPTION
Change the working directory to the PowerShell Scripts folder.
Change the working directory to the PowerShell scripts folder.
.EXAMPLE
PS> .\cd-scripts.ps1
.LINK
@ -13,7 +13,7 @@
$TargetDir = resolve-path "$PSScriptRoot"
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the PowerShell scripts folder at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "$HOME/.ssh"
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the user's SSH folder at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path ".."
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the folder 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "../.."
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the folder 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "../../.."
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the folder 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "../../../.."
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the folder 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"

View File

@ -13,7 +13,7 @@
$TargetDir = resolve-path "$HOME/Videos"
if (-not(test-path "$TargetDir" -pathType container)) {
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
write-warning "Sorry, the user's videos folder at 📂$TargetDir does not exist (yet)"
exit 1
}
set-location "$TargetDir"