mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-29 08:06:51 +01:00
Add open-videos-folder.ps1
This commit is contained in:
parent
62d729c359
commit
6ed1e06438
@ -158,16 +158,17 @@ moon.ps1, Prints the current moon phase
|
|||||||
mute-audio.ps1, Mutes the audio device
|
mute-audio.ps1, Mutes the audio device
|
||||||
open-browser.ps1, Starts the default Web browser
|
open-browser.ps1, Starts the default Web browser
|
||||||
open-calculator.ps1, Starts the calculator program
|
open-calculator.ps1, Starts the calculator program
|
||||||
open-downloads-folder.ps1, Opens the File Explorer with the downloads folder
|
open-downloads-folder.ps1, Opens the user's downloads folder
|
||||||
open-email-client.ps1, Starts the default email client
|
open-email-client.ps1, Starts the default email client
|
||||||
open-file-explorer.ps1, Opens the File Explorer
|
open-file-explorer.ps1, Opens the File Explorer
|
||||||
open-home-folder.ps1, Opens the File Explorer with the home folder
|
open-home-folder.ps1, Opens the user's home folder
|
||||||
open-music-folder.ps1, Opens the File Explorer with the music folder
|
open-music-folder.ps1, Opens the user's music folder
|
||||||
open-netflix.ps1, Starts the Netflix app
|
open-netflix.ps1, Starts the Netflix app
|
||||||
open-onedrive.ps1, Opens the user's OneDrive folder
|
open-onedrive-folder.ps1, Opens the user's OneDrive folder
|
||||||
open-recycle-bin.ps1, Opens the File Explorer with the recycle bin folder
|
open-recycle-bin.ps1, Opens the user's recycle bin folder
|
||||||
open-repos-folder.ps1, Opens the File Explorer with the Git repositories folder
|
open-repos-folder.ps1, Opens the user's Git repositories folder
|
||||||
open-task-manager.ps1, Starts the Task Manager
|
open-task-manager.ps1, Starts the Task Manager
|
||||||
|
open-videos-folder.ps1, Opens the user's videos folder
|
||||||
pick-commit.ps1, Cherry-picks a Git commit into multiple branches
|
pick-commit.ps1, Cherry-picks a Git commit into multiple branches
|
||||||
play-beep.ps1, Plays a beep sound
|
play-beep.ps1, Plays a beep sound
|
||||||
play-files.ps1, Plays the given audio files
|
play-files.ps1, Plays the given audio files
|
||||||
|
Can't render this file because it has a wrong number of fields in line 91.
|
26
Docs/open-music-folder.md
Normal file
26
Docs/open-music-folder.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
## open-music-folder.ps1 - Opens the music folder
|
||||||
|
|
||||||
|
This script starts the File Explorer to show the music folder.
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
```powershell
|
||||||
|
open-music-folder.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
|
[<CommonParameters>]
|
||||||
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
```powershell
|
||||||
|
PS> ./open-music-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-music-folder.ps1*
|
26
Docs/open-onedrive-folder.md
Normal file
26
Docs/open-onedrive-folder.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
## open-onedrive-folder.ps1 - Opens the user's OneDrive folder
|
||||||
|
|
||||||
|
This script opens the user's OneDrive folder.
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
```powershell
|
||||||
|
open-onedrive-folder.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
|
[<CommonParameters>]
|
||||||
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
```powershell
|
||||||
|
PS> ./open-onedrive
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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-onedrive-folder.ps1*
|
26
Docs/open-videos-folders.md
Normal file
26
Docs/open-videos-folders.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
## open-videos-folders.ps1 - Opens the File Explorer with the videos folder
|
||||||
|
|
||||||
|
This script starts the File Explorer to show the home folder.
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
```powershell
|
||||||
|
open-videos-folders.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
|
[<CommonParameters>]
|
||||||
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
```powershell
|
||||||
|
PS> ./open-videos-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-videos-folders.ps1*
|
15
README.md
15
README.md
@ -113,17 +113,18 @@ 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) |
|
| [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-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-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-downloads-folders.ps1](Scripts/open-downloads-folder.ps1) | Opens the user's 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-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) | Opens the File Explorer | [Help](Docs/open-file-explorer.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-home-folder.ps1](Scripts/open-home-folder.ps1) | Opens the user's 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-music-folder.ps1](Scripts/open-music-folder.ps1)| Opens the user's 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-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-onedrive-folder.ps1](Scripts/open-onedrive-folder.ps1)| Opens the user's OneDrive folder | [Help](Docs/open-onedrive-folder.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-recycle-bin.ps1](Scripts/open-recycle-bin.ps1) | Opens the user's recycle bin folder | [Help](Docs/open-recycle-bin.md) |
|
||||||
| [open-repos-folder.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 user's 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) |
|
| [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) |
|
| [open-videos-folder.ps1](Scripts/open-videos-folder.ps1)| Opens the user's videos folder | [Help](Docs/open-videos-folder.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) |
|
| [save-screenshot.ps1](Scripts/save-screenshot.ps1) | Saves a single screenshot | [Help](Docs/save-screenshot.md) |
|
||||||
| [set-wallpaper.ps1](Scripts/set-wallpaper.ps1) | Sets the given image as wallpaper | [Help](Docs/set-wallpaper.md) |
|
| [set-wallpaper.ps1](Scripts/set-wallpaper.ps1) | Sets the given image as wallpaper | [Help](Docs/set-wallpaper.md) |
|
||||||
|
|
||||||
|
24
Scripts/open-videos-folders.ps1
Executable file
24
Scripts/open-videos-folders.ps1
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Opens the File Explorer with the videos folder
|
||||||
|
.DESCRIPTION
|
||||||
|
This script starts the File Explorer to show the home folder.
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./open-videos-folder
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz · License: CC0
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
#>
|
||||||
|
|
||||||
|
try {
|
||||||
|
$TargetDir = resolve-path "$HOME/Videos"
|
||||||
|
if (-not(test-path "$TargetDir" -pathType container)) {
|
||||||
|
throw "Videos 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