I'm working on a simple script I have used to work/edit a large folder with movies/tv-shows and I have found an easy way to remove certain strings in folder and file titles, but it is a PowerShell command and I have the rest of my functions in a Python script.
First, I'm asking for someone who might be able to make a Python equivalent to this PowerShell line:
Get-ChildItem -Recurse | Where-Object {$_.Name -match 'SomeString'} | Rename-Item -NewName {$_.Name -replace 'SomeString', ''}
Second, I have experienced issues with the PowerShell command if the string I want removed contains the
[]
(like this:-[Something]
) - the titles will become unreadable and I'm not sure why.