mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-22 16:03:22 +01:00
Add cd-up.ps1
This commit is contained in:
parent
89a44fc88f
commit
6daa6a19ca
@ -2,6 +2,15 @@ Script,Description
|
||||
add-firewall-rules.ps1, adds firewall rules to the given executables (needs admin rights)
|
||||
build-repo.ps1, builds the current/given Git repository
|
||||
build-repos.ps1, builds all Git repositories under the current/given directory
|
||||
cd-desktop.ps1, go to the user's desktop folder
|
||||
cd-downloads.ps1, go to the user's downloads folder
|
||||
cd-dropbox.ps1, go to the user's dropbox folder
|
||||
cd-home.ps1, go to the user's home folder
|
||||
cd-music.ps1, go to the user's music folder
|
||||
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
|
||||
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
|
||||
@ -52,14 +61,6 @@ encrypt-file.ps1, encrypts the given file
|
||||
fetch-repo.ps1, fetches updates for the current/given Git repository (including submodules)
|
||||
fetch-repos.ps1, fetches updates for all Git repositories under the current/given directory (including submodules)
|
||||
generate-qrcode.ps1, generates a QR code
|
||||
go-desktop.ps1, go to the user's desktop folder
|
||||
go-downloads.ps1, go to the user's downloads folder
|
||||
go-dropbox.ps1, go to the user's dropbox folder
|
||||
go-home.ps1, go to the user's home folder
|
||||
go-music.ps1, go to the user's music folder
|
||||
go-repos.ps1, go to the user's Git repositories folder
|
||||
go-root.ps1, go to the root directory (C: on Windows)
|
||||
go-scripts.ps1, go to the PowerShell Scripts folder
|
||||
hibernate.ps1, enables hibernate mode for the local computer (needs admin rights)
|
||||
inspect-exe.ps1, prints basic information of the given executable file
|
||||
install-google-chrome.ps1, installs the Google Chrome browser
|
||||
|
|
17
README.md
17
README.md
@ -88,6 +88,15 @@ Mega Collection of PowerShell Scripts
|
||||
|
||||
📁 PowerShell Scripts for Files & Folders
|
||||
------------------------------------------
|
||||
* [cd-desktop.ps1](Scripts/cd-desktop.ps1) - go to the user's desktop folder
|
||||
* [cd-downloads.ps1](Scripts/cd-downloads.ps1) - go to the user's downloads folder
|
||||
* [cd-dropbox.ps1](Scripts/cd-dropbox.ps1) - go to the user's dropbox folder
|
||||
* [cd-home.ps1](Scripts/cd-home.ps1) - go to the user's home folder
|
||||
* [cd-music.ps1](Scripts/cd-music.ps1) - go to the user's music folder
|
||||
* [cd-repos.ps1](Scripts/cd-repos.ps1) - go to the user's Git repositories folder
|
||||
* [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
|
||||
* [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
|
||||
@ -97,14 +106,6 @@ Mega Collection of PowerShell Scripts
|
||||
* [download-file.ps1](Scripts/download-file.ps1) - downloads a file from the given URL
|
||||
* [edit.ps1](Scripts/edit.ps1) - edits the given file with the built-in text editor
|
||||
* [encrypt-file.ps1](Scripts/encrypt-file.ps1) - encrypts the given file
|
||||
* [go-desktop.ps1](Scripts/go-desktop.ps1) - go to the user's desktop folder
|
||||
* [go-downloads.ps1](Scripts/go-downloads.ps1) - go to the user's downloads folder
|
||||
* [go-dropbox.ps1](Scripts/go-dropbox.ps1) - go to the user's dropbox folder
|
||||
* [go-home.ps1](Scripts/go-home.ps1) - go to the user's home folder
|
||||
* [go-music.ps1](Scripts/go-music.ps1) - go to the user's music folder
|
||||
* [go-repos.ps1](Scripts/go-repos.ps1) - go to the user's Git repositories folder
|
||||
* [go-root.ps1](Scripts/go-root.ps1) - go to the root directory (C:\ on Windows)
|
||||
* [go-scripts.ps1](Scripts/go-scripts.ps1) - go to the PowerShell Scripts folder
|
||||
* [inspect-exe.ps1](Scripts/inspect-exe.ps1) - prints basic information of the given executable file
|
||||
* [list-dir.ps1](Scripts/list-dir.ps1) - lists the directory content (formatted in columns)
|
||||
* [list-dir-tree.ps1](Scripts/list-dir-tree.ps1) - lists the directory tree content
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/pwsh
|
||||
<#
|
||||
.SYNTAX go-desktop.ps1
|
||||
.SYNTAX cd-desktop.ps1
|
||||
.DESCRIPTION go to the user's desktop folder
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/pwsh
|
||||
<#
|
||||
.SYNTAX go-downloads.ps1
|
||||
.SYNTAX cd-downloads.ps1
|
||||
.DESCRIPTION go to the user's downloads folder
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/pwsh
|
||||
<#
|
||||
.SYNTAX go-dropbox.ps1
|
||||
.SYNTAX cd-dropbox.ps1
|
||||
.DESCRIPTION go to the user's Dropbox folder
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/pwsh
|
||||
<#
|
||||
.SYNTAX go-home.ps1
|
||||
.SYNTAX cd-home.ps1
|
||||
.DESCRIPTION go to the user's home folder
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/pwsh
|
||||
<#
|
||||
.SYNTAX go-music.ps1
|
||||
.SYNTAX cd-music.ps1
|
||||
.DESCRIPTION go to the user's music folder
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/pwsh
|
||||
<#
|
||||
.SYNTAX go-repos.ps1
|
||||
.SYNTAX cd-repos.ps1
|
||||
.DESCRIPTION go to the user's Git repositories folder
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/pwsh
|
||||
<#
|
||||
.SYNTAX go-root.ps1
|
||||
.SYNTAX cd-root.ps1
|
||||
.DESCRIPTION go to the root directory (C: on Windows)
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/pwsh
|
||||
<#
|
||||
.SYNTAX go-scripts.ps1
|
||||
.SYNTAX cd-scripts.ps1
|
||||
.DESCRIPTION go to the PowerShell Scripts folder
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
17
Scripts/cd-up.ps1
Executable file
17
Scripts/cd-up.ps1
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/pwsh
|
||||
<#
|
||||
.SYNTAX cd-up.ps1
|
||||
.DESCRIPTION go one or multiple directories up
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
$TargetDir = resolve-path ".."
|
||||
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