Update list-folder.ps1

This commit is contained in:
Markus Fleschutz 2023-10-09 13:26:26 +02:00
parent 1816f7d12d
commit dbef508e55

View File

@ -15,7 +15,7 @@
param([string]$searchPattern = "*")
function GetFileIcon { param([string]$suffix)
function GetFileIcon([string]$suffix) {
switch ($suffix) {
".csv" {return "📊"}
".epub" {return "📓"}
@ -30,7 +30,7 @@ function GetFileIcon { param([string]$suffix)
}
}
function ListFolder { param([string]$searchPattern)
function ListFolder([string]$searchPattern) {
$items = Get-ChildItem -path "$searchPattern"
foreach ($item in $items) {
$name = $item.Name