diff --git a/Data/scripts.csv b/Data/scripts.csv index b704f518..f45d5244 100644 --- a/Data/scripts.csv +++ b/Data/scripts.csv @@ -158,6 +158,7 @@ moon.ps1, Prints the current moon phase mute-audio.ps1, Mutes the audio device open-browser.ps1, Starts the default Web browser open-calculator.ps1, Starts the calculator program +open-c-drive.ps1, Opens the C: drive folder open-downloads-folder.ps1, Opens the user's downloads folder open-dropbox-folder.ps1, Opens the user's Dropbox folder open-email-client.ps1, Starts the default email client diff --git a/Docs/open-c-drive.md b/Docs/open-c-drive.md new file mode 100644 index 00000000..75a688f2 --- /dev/null +++ b/Docs/open-c-drive.md @@ -0,0 +1,26 @@ +## open-c-drive.ps1 - Opens the C: drive folder + +This script starts the File Explorer and shows the C: drive folder. + +## Parameters +```powershell +open-c-drive.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./open-c-drive + +``` + +## Notes +Author: Markus Fleschutz · License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +*Generated by convert-ps2md.ps1 using the comment-based help of open-c-drive.ps1* diff --git a/README.md b/README.md index df575d7d..079d22b9 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,7 @@ Mega Collection of PowerShell Scripts | [new-email.ps1](Scripts/new-email.ps1) | Starts the default email client to write a new email | [Help](Docs/new-email.md) | | [open-browser.ps1](Scripts/open-browser.ps1) | Starts the default Web browser | [Help](Docs/open-browser.md) | | [open-calculator.ps1](Scripts/open-calculator.ps1) | Starts the calculator program | [Help](Docs/open-calculator.md) | +| [open-c-drive.ps1](Scripts/open-c-drive.ps1) | Opens the C: drive folder | [Help](Docs/open-c-drive.md) | | [open-downloads-folders.ps1](Scripts/open-downloads-folder.ps1) | Opens the user's downloads folder | [Help](Docs/open-downloads-folder.md) | | [open-dropbox-folder.ps1](Scripts/open-dropbox-folder.ps1) | Opens the user's Dropbox folder | [Help](Docs/open-dropbox-folder.md) | | [open-email-client.ps1](Scripts/open-browser.ps1) | Starts the default email client | [Help](Docs/open-email-client.md) | diff --git a/Scripts/open-c-drive.ps1 b/Scripts/open-c-drive.ps1 new file mode 100755 index 00000000..99f446de --- /dev/null +++ b/Scripts/open-c-drive.ps1 @@ -0,0 +1,20 @@ +<# +.SYNOPSIS + Opens the C: drive folder +.DESCRIPTION + This script starts the File Explorer and shows the C: drive folder. +.EXAMPLE + PS> ./open-c-drive +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + 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 +}