SquigglyMonkey
asked on
Powershell script to move files
I see the cmdlet move-item, and wonder how I can move files based on age (>4 years) or I guess conversely not move files that have been accessed in the last 4 years or less.
Thx!
Thx!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You first get all objects with get-childitem, then filter with where-object for age, and pipe the remaining objects to move-item. The difficult part is to replace the root part of the source by the target root ...