mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-15 02:19:39 +01:00
Update list-workdir.ps1
This commit is contained in:
parent
ac6ec19bfd
commit
1cca88c32b
@ -2,9 +2,10 @@
|
||||
.SYNOPSIS
|
||||
Lists the current working directory
|
||||
.DESCRIPTION
|
||||
This PowerShell script lists the current working directory (but not the content itself!)
|
||||
This PowerShell script lists the path to current working directory (but not the content itself).
|
||||
.EXAMPLE
|
||||
PS> ./list-workdir
|
||||
📂C:\Users\Markus\source\repos\PowerShell\Scripts
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -12,10 +13,10 @@
|
||||
#>
|
||||
|
||||
try {
|
||||
$CWD = Resolve-Path "$PWD"
|
||||
"📂$CWD"
|
||||
$Path = Resolve-Path "$PWD"
|
||||
"📂$Path"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user