mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-18 16:39:03 +02:00
Updated the manuals
This commit is contained in:
@@ -6,7 +6,7 @@ This PowerShell script changes the working directory to the user's OneDrive fold
|
||||
Parameters
|
||||
----------
|
||||
```powershell
|
||||
PS> ./cd-onedrive.ps1 [<CommonParameters>]
|
||||
/home/markus/Repos/PowerShell/scripts/cd-onedrive.ps1 [<CommonParameters>]
|
||||
|
||||
[<CommonParameters>]
|
||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||
@@ -47,17 +47,15 @@ Script Content
|
||||
#>
|
||||
|
||||
try {
|
||||
$Path = Resolve-Path "$HOME/OneDrive"
|
||||
if (-not(Test-Path "$Path" -pathType container)) {
|
||||
throw "OneDrive folder at 📂$Path doesn't exist (yet)"
|
||||
}
|
||||
Set-Location "$Path"
|
||||
"📂$Path"
|
||||
$path = Resolve-Path "~/OneDrive"
|
||||
if (-not(Test-Path "$path" -pathType container)) { throw "No OneDrive folder at 📂$path - is OneDrive installed?" }
|
||||
Set-Location "$path"
|
||||
"📂$path"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
"⚠️ Error: $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 08/15/2024 09:50:44)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 11/08/2024 12:34:45)*
|
||||
|
Reference in New Issue
Block a user