Add cd-videos.ps1

This commit is contained in:
Markus Fleschutz 2021-04-21 08:22:47 +02:00
parent 96635e4911
commit 2041a385fa
3 changed files with 19 additions and 0 deletions

View File

@ -13,6 +13,7 @@ cd-repos.ps1, go to the user's Git repositories folder
cd-root.ps1, go to the root directory (C: on Windows)
cd-scripts.ps1, go to the PowerShell Scripts folder
cd-up.ps1, go one or multiple directories up
cd-videos.ps1, go to the user's videos folder
check-cpu-temp.ps1, checks the CPU temperature
check-dns-resolution.ps1, checks the DNS resolution with frequently used domain names
check-drive-space.ps1, checks the given drive for free space left

1 Script Description
13 cd-root.ps1 go to the root directory (C: on Windows)
14 cd-scripts.ps1 go to the PowerShell Scripts folder
15 cd-up.ps1 go one or multiple directories up
16 cd-videos.ps1 go to the user's videos folder
17 check-cpu-temp.ps1 checks the CPU temperature
18 check-dns-resolution.ps1 checks the DNS resolution with frequently used domain names
19 check-drive-space.ps1 checks the given drive for free space left

View File

@ -99,6 +99,7 @@ Mega Collection of PowerShell Scripts
* [cd-root.ps1](Scripts/cd-root.ps1) - go to the root directory (C:\ on Windows)
* [cd-scripts.ps1](Scripts/cd-scripts.ps1) - go to the PowerShell Scripts folder
* [cd-up.ps1](Scripts/cd-up.ps1) - go one or multiple directories up
* [cd-videos.ps1](Scripts/cd-videos.ps1) - go to the user's videos folder
* [check-symlinks.ps1](Scripts/check-symlinks.ps1) - checks every symlink in the given directory tree
* [check-xml-file.ps1](Scripts/check-xml-file.ps1) - checks the given XML file for validity
* [create-shortcut.ps1](Scripts/create-shortcut.ps1) - creates a shortcut

17
Scripts/cd-videos.ps1 Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/pwsh
<#
.SYNTAX cd-videos.ps1
.DESCRIPTION go to the user's videos folder
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
try {
$TargetDir = resolve-path "$HOME/Videos"
set-location "$TargetDir"
"📂$TargetDir"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}