Add cd-pics.ps1

This commit is contained in:
Markus Fleschutz 2021-04-21 08:18:40 +02:00
parent 01dfa3b83c
commit 96635e4911
3 changed files with 19 additions and 0 deletions

View File

@ -8,6 +8,7 @@ cd-downloads.ps1, go to the user's downloads folder
cd-dropbox.ps1, go to the user's dropbox folder
cd-home.ps1, go to the user's home folder
cd-music.ps1, go to the user's music folder
cd-pics.ps1, go to the user's pictures folder
cd-repos.ps1, go to the user's Git repositories folder
cd-root.ps1, go to the root directory (C: on Windows)
cd-scripts.ps1, go to the PowerShell Scripts folder

1 Script Description
8 cd-dropbox.ps1 go to the user's dropbox folder
9 cd-home.ps1 go to the user's home folder
10 cd-music.ps1 go to the user's music folder
11 cd-pics.ps1 go to the user's pictures folder
12 cd-repos.ps1 go to the user's Git repositories folder
13 cd-root.ps1 go to the root directory (C: on Windows)
14 cd-scripts.ps1 go to the PowerShell Scripts folder

View File

@ -94,6 +94,7 @@ Mega Collection of PowerShell Scripts
* [cd-dropbox.ps1](Scripts/cd-dropbox.ps1) - go to the user's dropbox folder
* [cd-home.ps1](Scripts/cd-home.ps1) - go to the user's home folder
* [cd-music.ps1](Scripts/cd-music.ps1) - go to the user's music folder
* [cd-pics.ps1](Scripts/cd-pics.ps1) - go to the user's pictures folder
* [cd-repos.ps1](Scripts/cd-repos.ps1) - go to the user's Git repositories folder
* [cd-root.ps1](Scripts/cd-root.ps1) - go to the root directory (C:\ on Windows)
* [cd-scripts.ps1](Scripts/cd-scripts.ps1) - go to the PowerShell Scripts folder

17
Scripts/cd-pics.ps1 Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/pwsh
<#
.SYNTAX cd-pics.ps1
.DESCRIPTION go to the user's pictures folder
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
try {
$TargetDir = resolve-path "$HOME/Pictures"
set-location "$TargetDir"
"📂$TargetDir"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}