diff --git a/Data/scripts.csv b/Data/scripts.csv index 5bbd0c17..6f719380 100644 --- a/Data/scripts.csv +++ b/Data/scripts.csv @@ -48,6 +48,7 @@ list-files.ps1, lists all files in the given folder and also in every subfolder list-formatted.ps1, lists the current working directory formatted in columns 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 list-installed-apps.ps1, lists the installed Windows Store apps list-installed-software.ps1, lists the installed software (except Windows Store apps) list-logbook.ps1, lists the content of the logbook diff --git a/README.md b/README.md index 105aac68..7f7b2948 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ Scripts for Files & Folders 📁 * [list-empty-files.ps1](Scripts/list-empty-files.ps1) - lists empty files within the given directory tree * [list-files.ps1](Scripts/list-files.ps1) - lists all files in the given folder and also in every subfolder * [list-formatted.ps1](Scripts/list-formatted.ps1) - lists the current working directory formatted in columns +* [list-hidden-files.ps1](Scripts/list-hidden-files.ps1) - lists hidden files within the given directory tree * [list-unused-files.ps1](Scripts/list-unused-files.ps1) - lists unused files in a directory tree * [make-install.ps1](Scripts/make-install.ps1) - installs built executables and libs to the installation directory * [MD5.ps1](Scripts/MD5.ps1) - prints the MD5 checksum of the given file diff --git a/Scripts/list-hidden-files.ps1 b/Scripts/list-hidden-files.ps1 new file mode 100755 index 00000000..fa854794 --- /dev/null +++ b/Scripts/list-hidden-files.ps1 @@ -0,0 +1,27 @@ +#!/bin/powershell +<# +.SYNTAX ./list-hidden-files.ps1 [] +.DESCRIPTION lists hidden files within the given directory tree +.LINK https://github.com/fleschutz/PowerShell +.NOTES Author: Markus Fleschutz / License: CC0 +#> + +param($DirTree = "") + +if ($DirTree -eq "" ) { + $DirTree = read-host "Enter the path to the directory tree" +} + +try { + [int]$Count = 0 + write-progress "Listing hidden files in $DirTree ..." + get-childItem $DirTree -attributes Hidden -recurse | foreach-object { + write-output "$_.FullName" + $Count++ + } + write-host -foregroundColor green "OK - found $Count hidden file(s)" + exit 0 +} catch { + write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +}