mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-22 16:03:22 +01:00
Add cd-onedrive.ps1
This commit is contained in:
parent
df4db74657
commit
5706a11bdd
@ -5,9 +5,10 @@ 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-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-onedrive.ps1, go to the user's OneDrive 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)
|
||||
|
|
@ -91,9 +91,10 @@ Mega Collection of PowerShell Scripts
|
||||
* [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-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-onedrive.ps1](Scripts/cd-onedrive.ps1) - go to the user's OneDrive 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)
|
||||
|
17
Scripts/cd-onedrive.ps1
Normal file
17
Scripts/cd-onedrive.ps1
Normal file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/pwsh
|
||||
<#
|
||||
.SYNTAX cd-onedrive.ps1
|
||||
.DESCRIPTION go to the user's OneDrive folder
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
$TargetDir = resolve-path "$HOME/OneDrive"
|
||||
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