mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-24 23:59:17 +01:00
Added list-hidden-files.ps1
This commit is contained in:
parent
f7f206df3b
commit
da8b23569c
@ -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-formatted.ps1, lists the current working directory formatted in columns
|
||||||
list-fritzbox-calls.ps1, lists the FRITZ!Box calls
|
list-fritzbox-calls.ps1, lists the FRITZ!Box calls
|
||||||
list-fritzbox-devices.ps1, lists FRITZ!Box's known devices
|
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-apps.ps1, lists the installed Windows Store apps
|
||||||
list-installed-software.ps1, lists the installed software (except Windows Store apps)
|
list-installed-software.ps1, lists the installed software (except Windows Store apps)
|
||||||
list-logbook.ps1, lists the content of the logbook
|
list-logbook.ps1, lists the content of the logbook
|
||||||
|
|
@ -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-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-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-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
|
* [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
|
* [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
|
* [MD5.ps1](Scripts/MD5.ps1) - prints the MD5 checksum of the given file
|
||||||
|
27
Scripts/list-hidden-files.ps1
Executable file
27
Scripts/list-hidden-files.ps1
Executable 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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user