From c65d4455e644eb916daa11198357ebdfb3344ac3 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Wed, 7 Apr 2021 14:12:57 +0200 Subject: [PATCH] Add open-file-explorer.ps1 --- Data/scripts.csv | 1 + README.md | 1 + Scripts/open-file-explorer.ps1 | 15 +++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 Scripts/open-file-explorer.ps1 diff --git a/Data/scripts.csv b/Data/scripts.csv index d9a99bc5..dac8dc81 100644 --- a/Data/scripts.csv +++ b/Data/scripts.csv @@ -100,6 +100,7 @@ next-joke.ps1], gets the next random Juck Norris joke open-browser.ps1, starts the default Web browser open-calculator.ps1, starts the calculator program open-email-client.ps1, starts the default email client +open-file-explorer.ps1, starts the Microsoft File Explorer play-beep.ps1, plays a beep sound play-mission-impossible.ps1, plays the Mission Impossible theme play-m3u.ps1, plays the given playlist (M3U file format) diff --git a/README.md b/README.md index bb6ca262..8e72f99c 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ Mega Collection of PowerShell Scripts * [open-browser.ps1](Scripts/open-browser.ps1) - starts the default Web browser * [open-calculator.ps1](Scripts/open-calculator.ps1) - starts the calculator program * [open-email-client.ps1](Scripts/open-browser.ps1) - starts the default email client +* [open-file-explorer.ps1](Scripts/open-file-explorer.ps1) - starts the File Explorer * [set-wallpaper.ps1](Scripts/set-wallpaper.ps1) - sets the given image as wallpaper * [take-screenshot.ps1](Scripts/take-screenshot.ps1) - takes a single screenshot * [take-screenshots.ps1](Scripts/take-screenshots.ps1) - takes multiple screenshots (every minute by default) diff --git a/Scripts/open-file-explorer.ps1 b/Scripts/open-file-explorer.ps1 new file mode 100644 index 00000000..3d0cc467 --- /dev/null +++ b/Scripts/open-file-explorer.ps1 @@ -0,0 +1,15 @@ +#!/usr/bin/pwsh +<# +.SYNTAX ./open-file-explorer.ps1 +.DESCRIPTION starts the File Explorerer +.LINK https://github.com/fleschutz/PowerShell +.NOTES Author: Markus Fleschutz / License: CC0 +#> + +try { + start-process explorer.exe + exit 0 +} catch { + write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +}