Function Move { #Moves all files older than 31 days old from the Source folder to the Target Get-Childitem -Path \"E:\\source\" | Where-Object { $_.LastWriteTime -l
Also be aware of hidden files, try adding -Force to Get-ChildItem
-Force
Get-ChildItem