how to get powershell to look for files in other folders when moving items?
- by steeluser
I have written this script to move files to the destination folder. Looks like I am missing something here because when I run the script, it is only looking for .zqx files in current directory and not all the drives. Please note that the ( dir $paths..) part is returning the list of .zqx files promptly.
Paths.txt has drive letters like this
C:\
D:\
E:\
$paths = get-content paths.txt
mv (dir $paths -r -fi *.zqx | ?{$_.lastwritetime -lt ($sevendaysold)}) -dest e:\xqz
Thanks
Steeluser