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