mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-23 14:18:38 +01:00
Add cd-videos.ps1
This commit is contained in:
parent
96635e4911
commit
2041a385fa
@ -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
|
||||
|
|
@ -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
17
Scripts/cd-videos.ps1
Executable 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user