Added list-hidden-files.ps1

This commit is contained in:
Markus Fleschutz 2021-02-27 11:37:50 +01:00
parent f7f206df3b
commit da8b23569c
3 changed files with 29 additions and 0 deletions

View File

@ -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

1 Script Description
48 list-formatted.ps1 lists the current working directory formatted in columns
49 list-fritzbox-calls.ps1 lists the FRITZ!Box calls
50 list-fritzbox-devices.ps1 lists FRITZ!Box's known devices
51 list-hidden-files.ps1 lists hidden files within the given directory tree
52 list-installed-apps.ps1 lists the installed Windows Store apps
53 list-installed-software.ps1 lists the installed software (except Windows Store apps)
54 list-logbook.ps1 lists the content of the logbook

View File

@ -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

27
Scripts/list-hidden-files.ps1 Executable file
View File

@ -0,0 +1,27 @@
#!/bin/powershell
<#
.SYNTAX ./list-hidden-files.ps1 [<dir-tree>]
.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
}