Add go-desktop.ps1 and go-dropbox.ps1

This commit is contained in:
Markus Fleschutz 2021-04-18 17:45:02 +02:00
parent f83042c654
commit 42512ee54a
10 changed files with 45 additions and 7 deletions

View File

@ -51,7 +51,9 @@ encrypt-file.ps1, encrypts the given file
fetch-repo.ps1, fetches updates for the current/given Git repository (including submodules)
fetch-repos.ps1, fetches updates for all Git repositories under the current/given directory (including submodules)
generate-qrcode.ps1, generates a QR code
go-desktop.ps1, go to the user's desktop folder
go-downloads.ps1, go to the user's downloads folder
go-dropbox.ps1, go to the user's dropbox folder
go-home.ps1, go to the user's home folder
go-music.ps1, go to the user's music folder
go-repos.ps1, go to the user's Git repositories folder

1 Script Description
51 fetch-repo.ps1 fetches updates for the current/given Git repository (including submodules)
52 fetch-repos.ps1 fetches updates for all Git repositories under the current/given directory (including submodules)
53 generate-qrcode.ps1 generates a QR code
54 go-desktop.ps1 go to the user's desktop folder
55 go-downloads.ps1 go to the user's downloads folder
56 go-dropbox.ps1 go to the user's dropbox folder
57 go-home.ps1 go to the user's home folder
58 go-music.ps1 go to the user's music folder
59 go-repos.ps1 go to the user's Git repositories folder

View File

@ -1,7 +1,7 @@
Mega Collection of PowerShell Scripts
=====================================
**This repository provides more than 180 useful and cross-platform PowerShell scripts in the subfolder [Scripts/](Scripts/) - to be used by command-line interface (CLI), for remote control (e.g. via SSH), by context menu, by voice control, by automation software like Jenkins, automatically as daily tasks, or simply to learn PowerShell. See the [PowerShell FAQ page](Misc/FAQ.md) if you need help or have any questions.**
**This repository provides more than 190 useful and cross-platform PowerShell scripts in the subfolder [Scripts/](Scripts/) - to be used by command-line interface (CLI), for remote control (e.g. via SSH), by context menu, by voice control, by automation software like Jenkins, automatically as daily tasks, or simply to learn PowerShell. See the [PowerShell FAQ page](Misc/FAQ.md) if you need help or have any questions.**
🔊 PowerShell Scripts for Audio & Voice
----------------------------------------
@ -95,7 +95,9 @@ Mega Collection of PowerShell Scripts
* [download-file.ps1](Scripts/download-file.ps1) - downloads a file from the given URL
* [edit.ps1](Scripts/edit.ps1) - edits the given file with the built-in text editor
* [encrypt-file.ps1](Scripts/encrypt-file.ps1) - encrypts the given file
* [go-desktop.ps1](Scripts/go-desktop.ps1) - go to the user's desktop folder
* [go-downloads.ps1](Scripts/go-downloads.ps1) - go to the user's downloads folder
* [go-dropbox.ps1](Scripts/go-dropbox.ps1) - go to the user's dropbox folder
* [go-home.ps1](Scripts/go-home.ps1) - go to the user's home folder
* [go-music.ps1](Scripts/go-music.ps1) - go to the user's music folder
* [go-repos.ps1](Scripts/go-repos.ps1) - go to the user's Git repositories folder

17
Scripts/go-desktop.ps1 Executable file
View File

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

View File

@ -9,7 +9,7 @@
try {
$TargetDir = resolve-path "$HOME/Downloads/"
set-location "$TargetDir"
" 📂$TargetDir"
"📂$TargetDir"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

17
Scripts/go-dropbox.ps1 Executable file
View File

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

View File

@ -9,7 +9,7 @@
try {
$TargetDir = resolve-path "$HOME/"
set-location "$TargetDir"
" 📂$TargetDir"
"📂$TargetDir"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -9,7 +9,7 @@
try {
$TargetDir = resolve-path "$HOME/Music/"
set-location "$TargetDir"
" 📂$TargetDir"
"📂$TargetDir"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -9,7 +9,7 @@
try {
$TargetDir = resolve-path "$HOME/Repos/"
set-location "$TargetDir"
" 📂$TargetDir"
"📂$TargetDir"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -13,7 +13,7 @@ try {
$TargetDir = resolve-path "C:/"
}
set-location "$TargetDir"
" 📂$TargetDir"
"📂$TargetDir"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -9,7 +9,7 @@
try {
$TargetDir = resolve-path "$PSScriptRoot/"
set-location "$TargetDir"
" 📂$TargetDir"
"📂$TargetDir"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"