Link to home
Start Free TrialLog in
Avatar of cnptechnologies
cnptechnologies

asked on

Powershell command that will move based on ownership and file type

Need a command (doesn't HAVE to be PowerShell) that will find all Microsoft Office files  in a folder and all subfolders owned by a specific user and then move them to another location.

I know that I will probably have to run the command over each team with a different extension such as .doc, .xls.

So far I have a powershell command that will do everything except find the files by type. I have the following command:

Get-Children -recurse d:\foldername | get-acl | where {$_.Owner -match "username" } | Move-Item -Destination "h:\foldername" -recurse
ASKER CERTIFIED SOLUTION
Avatar of becraig
becraig
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial