I have a directory of files that I’d like to append file extension to as long as they don’t have an existing, specified extension. So add .txt to all file names that don’t end in .xyz. PowerShell seems like a good candidate for this, but I don’t know anything about it. How would I go about it?
Share
+1 to EBGreen, except that (at least on XP) the ‘-exclude’ parameter to get-childitem doesn’t seem to work. The help text (gci -?) actually says ‘this parameter does not work properly in this cmdlet’!
So you can filter manually like this: