Just for the record because it took me some time to find this.
Open Powershell as Admin.
Type:
*NOTE: The folder containing your files, must not have any kind of special characters! So rename your end folder to a complete word or a letter!
Copy paste:
*in .ext change to file extension. (.txt, .png, .mp3, .jpeg, etc.)
* in basename.lengt-# put number of characters to delete.
Here's an example!
I'm currently trying to delete the last 4 characters of all these files in this folder:
So, instead of having:
2-in-1 - Asterix & Obelix - Bash Them All! + XXL (E).png
I end up having:
2-in-1 - Asterix & Obelix - Bash Them All! + XXL.png
In my case, I'm using 4 characters to delete from the file's name, that's the space and the region code:
_(U)
_(E)
_(J)
Here's how the PowerShell script looks like:
And now I have:
That's all.
Again, just to have it somewhere in case I forget about this.
Open Powershell as Admin.
Type:
Code:
cd (route of folder)
Copy paste:
Code:
gci *.ext | rename-item -newname { $_.basename.substring(0,$_.basename.length-#) + $_.extension }
*in .ext change to file extension. (.txt, .png, .mp3, .jpeg, etc.)
* in basename.lengt-# put number of characters to delete.
Here's an example!
I'm currently trying to delete the last 4 characters of all these files in this folder:
So, instead of having:
2-in-1 - Asterix & Obelix - Bash Them All! + XXL (E).png
I end up having:
2-in-1 - Asterix & Obelix - Bash Them All! + XXL.png
In my case, I'm using 4 characters to delete from the file's name, that's the space and the region code:
_(U)
_(E)
_(J)
Here's how the PowerShell script looks like:
And now I have:
That's all.
Again, just to have it somewhere in case I forget about this.
Last edited by JuanMena,