diff --git a/Data/scripts.csv b/Data/scripts.csv index 89d4b9dd..b90532ff 100644 --- a/Data/scripts.csv +++ b/Data/scripts.csv @@ -161,6 +161,7 @@ open-calculator.ps1, Starts the calculator program open-downloads-folder.ps1, Opens the downloads folder open-email-client.ps1, Starts the default email client open-file-explorer.ps1, Starts the Microsoft File Explorer +open-home-folder.ps1, Opens the home folder open-netflix.ps1, Starts the Netflix app open-onedrive.ps1, Opens the user's OneDrive folder open-recycle-bin.ps1, Starts the File Explorer with the recycle bin folder diff --git a/Docs/export-to-serenade.md b/Docs/export-to-serenade.md index 029cd475..bab1d61f 100644 --- a/Docs/export-to-serenade.md +++ b/Docs/export-to-serenade.md @@ -25,11 +25,11 @@ export-to-serenade.ps1 [[-WakeWord] ] [[-FilePattern] ] [[-Targe Accept wildcard characters? false -TargetFile - Specifies the target file ("$HOME/.serenade/scripts/custom.js" by default) + Specifies the target file ("$HOME/.serenade/scripts/PowerShell.js" by default) Required? false Position? 3 - Default value "$HOME/.serenade/scripts/custom.js" + Default value "$HOME/.serenade/scripts/PowerShell.js" Accept pipeline input? false Accept wildcard characters? false @@ -41,8 +41,8 @@ export-to-serenade.ps1 [[-WakeWord] ] [[-FilePattern] ] [[-Targe ## Example ```powershell PS> ./export-to-serenade.ps1 Computer -⏳ Exporting 264 scripts to C:\Users\Markus/.serenade/scripts/custom.js... -✔️ exported 264 PowerShell scripts to Serenade in 22 sec +⏳ Exporting 264 PowerShell scripts to C:\Users\Markus/.serenade/scripts/PowerShell.js... +✔️ exported 264 scripts with wakework "Computer" to Serenade in 22 sec ``` diff --git a/Docs/open-downloads-folder.md b/Docs/open-downloads-folder.md new file mode 100644 index 00000000..ae3fa69e --- /dev/null +++ b/Docs/open-downloads-folder.md @@ -0,0 +1,26 @@ +## open-downloads-folder.ps1 - Opens the downloads folder + +This script starts the File Explorer to show the downloads folder. + +## Parameters +```powershell +open-downloads-folder.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./open-downloads-folder + +``` + +## 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-downloads-folder.ps1* diff --git a/Docs/open-file-explorer.md b/Docs/open-file-explorer.md index 79a3b34f..dfa7942a 100644 --- a/Docs/open-file-explorer.md +++ b/Docs/open-file-explorer.md @@ -4,7 +4,16 @@ This script starts the File Explorer. ## Parameters ```powershell -open-file-explorer.ps1 [] +open-file-explorer.ps1 [[-Path] ] [] + +-Path + Specifies the path to the folder to display + + Required? false + Position? 1 + Default value + Accept pipeline input? false + Accept wildcard characters? false [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-home-folder.md b/Docs/open-home-folder.md new file mode 100644 index 00000000..6b19c865 --- /dev/null +++ b/Docs/open-home-folder.md @@ -0,0 +1,26 @@ +## open-home-folder.ps1 - Opens the home folder + +This script starts the File Explorer to show the home folder. + +## Parameters +```powershell +open-home-folder.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./open-home-folder + +``` + +## 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-home-folder.ps1* diff --git a/README.md b/README.md index 4af738b1..342b9a99 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ Mega Collection of PowerShell Scripts | [open-downloads-folders.ps1](Scripts/open-downloads-folder.ps1) | Opens the downloads folder | [Help](Docs/open-downloads-folder.md) | | [open-email-client.ps1](Scripts/open-browser.ps1) | Starts the default email client | [Help](Docs/open-email-client.md) | | [open-file-explorer.ps1](Scripts/open-file-explorer.ps1) | Starts the File Explorer | [Help](Docs/open-file-explorer.md) | +| [open-home-folders.ps1](Scripts/open-home-folder.ps1) | Opens the home folder | [Help](Docs/open-home-folder.md) | | [open-netflix.ps1](Scripts/open-netflix.ps1) | Starts the Netflix app | [Help](Docs/open-netflix.md) | | [open-onedrive.ps1](Scripts/open-onedrive.ps1) | Opens the user's OneDrive folder | [Help](Docs/open-onedrive.md) | | [open-recycle-bin.ps1](Scripts/open-recycle-bin.ps1) | Starts the File Explorer with the recycle bin folder | [Help](Docs/open-recycle-bin.md) | diff --git a/Scripts/export-to-manuals.ps1 b/Scripts/export-to-manuals.ps1 index 7db7e39a..45de7ac0 100755 --- a/Scripts/export-to-manuals.ps1 +++ b/Scripts/export-to-manuals.ps1 @@ -5,7 +5,7 @@ This script exports the comment based help of all PowerShell scripts as manuals. .EXAMPLE PS> ./export-to-manuals.ps1 - Exporting 264 PowerShell scripts to /home/markus/PowerShell/Docs... + Found 264 scripts, exporting them to /home/markus/PowerShell/Docs... ✔️ exported 264 PowerShell scripts in 28 sec .NOTES Author: Markus Fleschutz · License: CC0 @@ -21,7 +21,7 @@ try { $StopWatch = [system.diagnostics.stopwatch]::startNew() $Scripts = Get-ChildItem "$FilePattern" - "⏳ Exporting $($Scripts.Count) PowerShell scripts to $TargetDir..." + "⏳ Found $($Scripts.Count) scripts, exporting them to $TargetDir..." foreach ($Script in $Scripts) { & "$PSScriptRoot/convert-ps2md" "$Script" > "$TargetDir/$($Script.BaseName).md" diff --git a/Scripts/open-home-folder.ps1 b/Scripts/open-home-folder.ps1 new file mode 100755 index 00000000..fd2fe854 --- /dev/null +++ b/Scripts/open-home-folder.ps1 @@ -0,0 +1,24 @@ +<# +.SYNOPSIS + Opens the home folder +.DESCRIPTION + This script starts the File Explorer to show the home folder. +.EXAMPLE + PS> ./open-home-folder +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +try { + $TargetDir = resolve-path "$HOME" + if (-not(test-path "$TargetDir" -pathType container)) { + throw "Home folder at 📂$TargetDir doesn't exist (yet)" + } + & "$PSScriptRoot/open-file-explorer.ps1" "$TargetDir" + exit 0 # success +} catch { + "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" + exit 1 +}