Use child-item result object in array
I encountered a problem in PowerShell in listing its child items. $file = Get-ChildItem \\compname\c$\folder\ -Recurse -Filter *filename.txt* | Select-Object -Property DirectoryName, FullName When I try this to get its objects it was empty: $file.FullName or $file.DirectoryName If there is a many files in that directory with the same file name, how can I backup up those files in the same folder by by adding .bak on its file extension. You're still using PowerShell v2 or earlier. These early versions don't support member enumeration on arrays, which would allow you to access properties of array