mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 00:54:04 +01:00
Update the cd-* scripts
This commit is contained in:
parent
439387b735
commit
cb35d425c5
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user