mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-23 00:13:36 +01:00
Add open-music-folder.ps1
This commit is contained in:
parent
87bab35a81
commit
62d729c359
@ -158,14 +158,15 @@ 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-downloads-folder.ps1, Opens the downloads folder
|
||||
open-downloads-folder.ps1, Opens the File Explorer with 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-file-explorer.ps1, Opens the File Explorer
|
||||
open-home-folder.ps1, Opens the File Explorer with the home folder
|
||||
open-music-folder.ps1, Opens the File Explorer with the music 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
|
||||
open-repos-folder.ps1, Opens the Git repositories folder
|
||||
open-recycle-bin.ps1, Opens the File Explorer with the recycle bin folder
|
||||
open-repos-folder.ps1, Opens the File Explorer with the Git repositories folder
|
||||
open-task-manager.ps1, Starts the Task Manager
|
||||
pick-commit.ps1, Cherry-picks a Git commit into multiple branches
|
||||
play-beep.ps1, Plays a beep sound
|
||||
|
Can't render this file because it has a wrong number of fields in line 91.
|
@ -115,12 +115,13 @@ Mega Collection of PowerShell Scripts
|
||||
| [open-calculator.ps1](Scripts/open-calculator.ps1) | Starts the calculator program | [Help](Docs/open-calculator.md) |
|
||||
| [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-file-explorer.ps1](Scripts/open-file-explorer.ps1) | Opens the File Explorer | [Help](Docs/open-file-explorer.md) |
|
||||
| [open-home-folder.ps1](Scripts/open-home-folder.ps1) | Opens the File Explorer with the home folder | [Help](Docs/open-home-folder.md) |
|
||||
| [open-music-folder.ps1](Scripts/open-music-folder.ps1)| Opens the File Explorer with the music folder | [Help](Docs/open-music-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) |
|
||||
| [open-repos-folders.ps1](Scripts/open-repos-folder.ps1) | Opens the Git repositories folder | [Help](Docs/open-repos-folder.md) |
|
||||
| [open-repos-folder.ps1](Scripts/open-repos-folder.ps1) | Opens the Git repositories folder | [Help](Docs/open-repos-folder.md) |
|
||||
| [open-task-manager.ps1](Scripts/open-task-manager.ps1)| Starts the Task Manager | [Help](Docs/open-task-manager.md) |
|
||||
| [remind-me.ps1](Scripts/remind-me.ps1) | Creates a scheduled task that will display a popup message | [Help](Docs/remind-me.md) |
|
||||
| [save-screenshot.ps1](Scripts/save-screenshot.ps1) | Saves a single screenshot | [Help](Docs/save-screenshot.md) |
|
||||
|
24
Scripts/open-music-folder.ps1
Executable file
24
Scripts/open-music-folder.ps1
Executable file
@ -0,0 +1,24 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Opens the music folder
|
||||
.DESCRIPTION
|
||||
This script starts the File Explorer to show the music folder.
|
||||
.EXAMPLE
|
||||
PS> ./open-music-folder
|
||||
.NOTES
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
|
||||
try {
|
||||
$TargetDir = resolve-path "$HOME/Music"
|
||||
if (-not(test-path "$TargetDir" -pathType container)) {
|
||||
throw "Music 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user