mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-02 10:59:14 +01:00
Add cd-docs.ps1
This commit is contained in:
parent
c556e36e69
commit
01dfa3b83c
@ -3,6 +3,7 @@ add-firewall-rules.ps1, adds firewall rules to the given executables (needs admi
|
||||
build-repo.ps1, builds the current/given Git repository
|
||||
build-repos.ps1, builds all Git repositories under the current/given directory
|
||||
cd-desktop.ps1, go to the user's desktop folder
|
||||
cd-docs.ps1, go to the user's documents folder
|
||||
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
|
||||
|
|
@ -89,6 +89,7 @@ Mega Collection of PowerShell Scripts
|
||||
📁 PowerShell Scripts for Files & Folders
|
||||
------------------------------------------
|
||||
* [cd-desktop.ps1](Scripts/cd-desktop.ps1) - go to the user's desktop folder
|
||||
* [cd-docs.ps1](Scripts/cd-docs.ps1) - go to the user's documents folder
|
||||
* [cd-downloads.ps1](Scripts/cd-downloads.ps1) - go to the user's downloads folder
|
||||
* [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
|
||||
|
17
Scripts/cd-docs.ps1
Executable file
17
Scripts/cd-docs.ps1
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/pwsh
|
||||
<#
|
||||
.SYNTAX cd-docs.ps1
|
||||
.DESCRIPTION go to the user's documents folder
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
$TargetDir = resolve-path "$HOME/Documents"
|
||||
set-location "$TargetDir"
|
||||
"📂$TargetDir"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user