Hello everyone,
I am rookie in a power shell, and I will be grateful for some help. I was trying to rename the suffix of filename, but it didn't go very well. Name of my file is: "hello.txt.abcdefg" I want to rename it into "hello.txt". I already tryed something like this:
Get-ChildItem * | Rename-Item -NewName {$_.name -replace ".%",'.txt'}
Get-ChildItem * | Rename-Item -NewName {$_.name -replace ".*",'.txt'}
I really don't know what am I doing here, so I will be grateful for a solution and some explanation here.
thanks in advance,
Alex