My script is working properly with the current array values; however, the actual file names will have about five characters in the prefix that I would like ignored: Example of one of the file names: 03_R___1087010076_9999992_35_401_01_20121107_134029_0667.I00.asd . The only part of the file name that I would like to parse is "108701####" ignoring the prefix 03_R___.
$source ="\\127.0.0.1\baunhof\*"
$File_Array_8HP70=@("108701")
$File_Array_8HP70X=@("108702")
$File_Array_9HP48=@("109401", "1094080", "1094090")
$File_Array_9HP48X=@("109402", "1094091", "1094082", "1094092")
$File_Array_8HP70_start = $File_Array_8HP70 | % {$_+"*"}
$File_Array_8HP70X_start = $File_Array_8HP70X | % {$_+"*"}
$File_Array_9HP48_start = $File_Array_9HP48 | % {$_+"*"}
$File_Array_9HP48X_start = $File_Array_9HP48X | % {$_+"*"}
$files = get-childitem $source -include $File_Array_8HP70_start -recurse
$files1 = get-childitem $source -include $File_Array_8HP70X_start -recurse
$files2 = get-childitem $source -include $File_Array_9HP48_start -recurse