mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 21:07:40 +02:00
Add datatype to param()
This commit is contained in:
@ -11,10 +11,11 @@
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param($DirTree = "")
|
||||
if ($DirTree -eq "" ) { $DirTree = read-host "Enter path to directory tree" }
|
||||
param([string]$DirTree = "")
|
||||
|
||||
try {
|
||||
if ($DirTree -eq "" ) { $DirTree = read-host "Enter path to directory tree" }
|
||||
|
||||
Get-ChildItem -path $DirTree -recurse | select FullName
|
||||
exit 0
|
||||
} catch {
|
||||
|
Reference in New Issue
Block a user