mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-17 08:01:31 +02:00
Improve warning of the cd-* scripts
This commit is contained in:
@ -12,6 +12,10 @@ function Get-CurrentUserSID { [CmdletBinding()] param()
|
||||
|
||||
|
||||
$TargetDir = 'C:\$Recycle.Bin\' + "$(Get-CurrentUserSID)"
|
||||
if (-not(test-path "$TargetDir" -pathType container)) {
|
||||
write-warning "Sorry, there is no folder 📂$TargetDir (yet)"
|
||||
exit 1
|
||||
}
|
||||
set-location "$TargetDir"
|
||||
"📂$TargetDir"
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user