I have written a script to capture all files within the folder, but how do I run a program with dos command for only files in the folder and it subfolder?
$files = get-childitem c:\test -recurse
foreach($file in $files){
$filesCounts = $files.Count
if(!$filesCounts)
{
$filesCount = 1
}
$intNumberfiles++
& "C:\program files (x86)\program\program.exe" -password KIVnow C:\test\.\$file
}