Pretty simple script to recurse through a given directory, find folders matching a "*.ready" filter, and recursively move/archive them to a UNC path. Works with no issues save for a few files in subdirectories.
Script in question (snipped down to relevant parts):
$src = "F:\Plunet\order"
$logFile = "C:\Scripts\plunetArchive\logs" + (Get-Date -f yyyy-MM-dd_HH-mm) + ".log"
$fileList = Get-Childitem -Directory -Path $src -Filter "*.ready" -Name
function Move-PlunetOrderFiles ()
{
$fileList | foreach-object {
robocopy "$src\$_" "\\192.168.100.208\backups\order\$_" /E /ZB /MOVE /IS /TS /FP /NP /R:1 /W:1 /V /TEE /LOG+:$logFile
}
}
E