$DefaultPath = "
$dirs = get-childitem -Recurse -Path $DefaultPath | where {$_.mode -match "d"}
foreach($dir in $dirs)
{
$dirname = $dir.FullName
for ($i=1; $i -le 100; $i++)
{
$filename = "$dirname\file$i.txt"
write-host $filename
New-Item $filename -type file -force -value "This is text added to the file"
}
}