Hi,
I've looked at the wiki and searched the manual but I can't seem to find a way of removing the _ in filenames.
I want e.g. "I_Love_This_Film_(2009)[1]" to be replaced with "I Love This Film (2009)"
Any ideas would be helpful, thank you
N00b: Underscore Clearing Script.
-
- Release Testers
- Posts: 180
- Joined: February 20th, 2008, 3:16 pm
Re: N00b: Underscore Clearing Script.
pc or linux? what exactly do you want the _ removed from? filenames? directories?
Re: N00b: Underscore Clearing Script.
This will be for PC using Win 7.
I have just come from ALTbinz and it used to replace all the underscores, I prefer the collection with spaces as it looks neater.
I notice I wrote filenames in the previous, but what i meant was the folder name, i.e. the name of the NZB therefore my example was the name of the folder before and after sorry.
thanks
I have just come from ALTbinz and it used to replace all the underscores, I prefer the collection with spaces as it looks neater.
I notice I wrote filenames in the previous, but what i meant was the folder name, i.e. the name of the NZB therefore my example was the name of the folder before and after sorry.
thanks
-
- Release Testers
- Posts: 180
- Joined: February 20th, 2008, 3:16 pm
Re: N00b: Underscore Clearing Script.
well. If you have a single level directory structure and the name of the directory is the same as the name of the nzb you can do this
I've not tested this, so forgive any errors!
Code: Select all
REM root will be different for you
set root=C:\mydownloads\linux
REM paramater 3 is the nzb name
set name=%3
REM remove quotes from the name
set name=%name:"=%
REM replace _ with space
set newname=%name:_= %
REM rename the directory
rename "%root%\%dirname%" "%newname%"