Rename list-dir.ps1 to list-folder.ps1

This commit is contained in:
Markus Fleschutz 2021-10-10 10:25:48 +02:00
parent 1e20cb74ce
commit 00ba134682
4 changed files with 10 additions and 9 deletions

View File

@ -100,7 +100,6 @@ list-cli-tools.ps1, Lists available command-line interface (CLI) tools
list-clipboard.ps1, Lists the contents of the clipboard
list-credits.ps1, Shows the credits
list-crypto-rates.ps1, Lists the current crypto exchange rates
list-dir.ps1, Lists the directory content (formatted in columns)
list-dir-tree.ps1, Lists the directory tree content
list-drives.ps1, Lists all drives
list-environment-variables.ps1, Lists all environment variables
@ -108,6 +107,7 @@ list-emojis.ps1, Lists the emojis of Unicode 13.0
list-empty-dirs.ps1, Lists empty subfolders within the given directory tree
list-empty-files.ps1, Lists empty files within the given directory tree
list-files.ps1, Lists all files in the given folder and also in every subfolder
list-folder.ps1, Lists the folder content
list-fritzbox-calls.ps1, Lists the FRITZ!Box calls
list-fritzbox-devices.ps1, Lists FRITZ!Box's known devices
list-hidden-files.ps1, Lists hidden files within the given directory tree

Can't render this file because it has a wrong number of fields in line 88.

View File

@ -158,11 +158,11 @@ Mega Collection of PowerShell Scripts
| [get-sha1.ps1](Scripts/get-sha1.ps1) | Prints the SHA1 checksum of the given file | [Help](Docs/get-sha1.md) |
| [get-sha256.ps1](Scripts/get-sha256.ps1) | Prints the SHA256 checksum of the given file | [Help](Docs/get-sha256.md) |
| [inspect-exe.ps1](Scripts/inspect-exe.ps1) | Prints basic information of the given executable file | [Help](Docs/inspect-exe.md) |
| [list-dir.ps1](Scripts/list-dir.ps1) | Lists the directory content (formatted in columns) | [Help](Docs/list-dir.md) |
| [list-dir-tree.ps1](Scripts/list-dir-tree.ps1) | Lists the directory tree content | [Help](Docs/list-dir-treep.md) |
| [list-empty-dirs.ps1](Scripts/list-empty-dirs.ps1) | Lists empty subfolders within the given directory tree | [Help](Docs/list-empty-dirs.md) |
| [list-empty-files.ps1](Scripts/list-empty-files.ps1) | Lists empty files within the given directory tree | [Help](Docs/list-empty-files.md) |
| [list-files.ps1](Scripts/list-files.ps1) | Lists all files in the given folder and also in every subfolder | [Help](Docs/list-files.md) |
| [list-folder.ps1](Scripts/list-folder.ps1) | Lists the folder content | [Help](Docs/list-folder.md) |
| [list-hidden-files.ps1](Scripts/list-hidden-files.ps1) | Lists hidden files within the given directory tree | [Help](Docs/list-hidden-files.md) |
| [list-recycle-bin.ps1](Scripts/list-recycle-bin.ps1) | Lists the content of the recycle bin folder | [Help](Docs/list-recycle-bin.md) |
| [list-unused-files.ps1](Scripts/list-unused-files.ps1) | Lists unused files in a directory tree | [Help](Docs/list-unused-files.md) |

View File

@ -1,11 +1,12 @@
<#
.SYNOPSIS
Lists the directory content formatted in columns
Lists the folder content
.DESCRIPTION
list-dir.ps1 [<SearchPattern>]
<SearchPattern> is "*" (anything) by default
This script lists the directory content formatted in columns.
.PARAMETER SearchPattern
Specifies the search pattern, "*" by default (means anything)
.EXAMPLE
PS> ./list-dir C:\
PS> ./list-folder C:\
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
@ -14,7 +15,7 @@
param([string]$SearchPattern = "*")
function ListDir { param([string]$SearchPattern)
function ListFolder { param([string]$SearchPattern)
$Items = get-childItem -path "$SearchPattern"
foreach ($Item in $Items) {
$Name = $Item.Name
@ -29,7 +30,7 @@ function ListDir { param([string]$SearchPattern)
}
try {
ListDir $SearchPattern | format-wide -autoSize
ListFolder $SearchPattern | format-wide -autoSize
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"

View File

@ -23,6 +23,6 @@ del alias:pwd -force -errorAction SilentlyContinue
set-alias -name pwd -value list-workdir.ps1 # pwd = print working directory
set-alias -name ll -value get-childitem # ll = list long
del alias:ls -force -errorAction SilentlyContinue
set-alias -name ls -value list-dir.ps1
set-alias -name ls -value list-folder.ps1
set-alias -name .. -value cd-up.ps1 # 1 dir level up
set-alias -name ... -value cd-up2.ps1 # 2 dir levels up