mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-16 15:41:52 +02:00
Updated the Markdown manuals
This commit is contained in:
@ -19,7 +19,7 @@ Script Content
|
||||
```powershell
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Sets the working directory to the user's trash folder
|
||||
Sets the working directory to the trash folder
|
||||
.DESCRIPTION
|
||||
This PowerShell script changes the working directory to the user's trash folder.
|
||||
.EXAMPLE
|
||||
@ -39,13 +39,13 @@ function GetCurrentUserSID { [CmdletBinding()] param()
|
||||
|
||||
try {
|
||||
if ($IsLinux) {
|
||||
$Path = "$HOME/.local/share/Trash/"
|
||||
$path = "$HOME/.local/share/Trash/"
|
||||
} else {
|
||||
$Path = "C:\$Recycle.Bin\" + "$(GetCurrentUserSID)"
|
||||
$path = "C:\`$Recycle.Bin\$(GetCurrentUserSID)"
|
||||
}
|
||||
if (-not(Test-Path "$Path" -pathType container)) { throw "Trash folder at 📂$Path doesn't exist (yet)" }
|
||||
Set-Location "$Path"
|
||||
"📂$Path"
|
||||
if (-not(Test-Path "$path" -pathType container)) { throw "Trash folder at 📂$path doesn't exist (yet)" }
|
||||
Set-Location "$path"
|
||||
"📂$path"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
@ -53,4 +53,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-trash.ps1 as of 03/27/2024 17:36:23)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-trash.ps1 as of 05/19/2024 10:25:17)*
|
||||
|
Reference in New Issue
Block a user