Add several scripts

This commit is contained in:
Markus Fleschutz 2021-11-03 16:46:35 +01:00
parent 535986d50f
commit e4aef680b8
4 changed files with 47 additions and 8 deletions

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Opens the C: drive folder
.DESCRIPTION
This script launches the File Explorer showing the C: drive folder.
This script launches the File Explorer with the C: drive folder.
.EXAMPLE
PS> ./open-c-drive
.NOTES
@ -11,10 +11,5 @@
https://github.com/fleschutz/PowerShell
#>
try {
& "$PSScriptRoot/open-file-explorer.ps1" C:
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}
& "$PSScriptRoot/open-file-explorer.ps1" "C:"
exit 0 # success

14
Scripts/open-d-drive.ps1 Executable file
View File

@ -0,0 +1,14 @@
<#
.SYNOPSIS
Opens the D: drive folder
.DESCRIPTION
This script launches the File Explorer with the D: drive folder.
.EXAMPLE
PS> ./open-d-drive
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
& "$PSScriptRoot/open-file-explorer.ps1" "D:"

15
Scripts/open-f-drive.ps1 Executable file
View File

@ -0,0 +1,15 @@
<#
.SYNOPSIS
Opens the F: drive folder
.DESCRIPTION
This script launches the File Explorer with the F: drive folder.
.EXAMPLE
PS> ./open-f-drive
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
& "$PSScriptRoot/open-file-explorer.ps1" "F:"
exit 0 # success

15
Scripts/open-m-drive.ps1 Executable file
View File

@ -0,0 +1,15 @@
<#
.SYNOPSIS
Opens the M: drive folder
.DESCRIPTION
This script launches the File Explorer with the M: drive folder.
.EXAMPLE
PS> ./open-m-drive
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
& "$PSScriptRoot/open-file-explorer.ps1" "M:"
exit 0 # success