mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-27 09:08:58 +01:00
Updated new-dir.ps1
This commit is contained in:
parent
598adae9cb
commit
fa37a97c92
@ -6,8 +6,8 @@
|
|||||||
.PARAMETER path
|
.PARAMETER path
|
||||||
Specifies the path and filename of the new directory
|
Specifies the path and filename of the new directory
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./new-dir.ps1 Joe
|
PS> ./new-dir.ps1 MyCollection
|
||||||
✔️ New directory 'Joe' created.
|
✔️ New 📂C:\Temp\MyCollection created.
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -24,7 +24,7 @@ try {
|
|||||||
$null = (New-Item -itemType directory -path $path)
|
$null = (New-Item -itemType directory -path $path)
|
||||||
|
|
||||||
$path = Resolve-Path $path
|
$path = Resolve-Path $path
|
||||||
"✔️ New directory 📂$path created."
|
"✔️ New 📂$path created."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user