Powershell command to delete duplicate fils and folders
all,
i had restore data , created duplicates name [1] , [2] within folder , file structure. i'm curious if can offer advice how can search , find these files , folders?
i tried regular search expression [1] found files 1 in them.
i tried powershell command no luck - get-childitem -recurse | select-string -pattern "[*]" | group path | select name
any appreciated!
jeremy whittaker mcse mcsa ccna cca senior consultant n2 network solutions http://www.n2networksolutions.com
in example pattern regex , [ , ] special characters. this worked me:
get-childitem c:\temp -filter "*[*]*" -recurse | remove-item
but nuclear option, might want replace remove-item select fullname so can review removed before removing it.
i hope post has helped!
Windows Server > Windows PowerShell
Comments
Post a Comment