I'm sorry to post this, I don't have the reputation to make the question on the comments of the post. So i read this in a thread (see link below) on how to rename files with Power Shell. My particular case was to remove character at the end.
(BTW i'm not familiar with PowerShell, so have mercy on me for the simple question).
How do I remove the same part of a file name for many files in Windows 7?
I use it the first time and worked perfectly fine. The second time around I got the following Error message:
Rename-Item : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'NewName'. Specified method is not supported. At line:1 char:69 + ... df | ForEach-Object { Rename-Item $_$_.name.replace("-Layout1", "") } + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Rename-Item], ParameterBindingException + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.PowerShell.Commands.RenameItemCommand
I don't understand what is wrong since the first time worked. Can someone guide me please?
Thank guys for making this website great!
$_
and$_.name.replace("-Layout1", "")