Replace dash in foldernames with spaces

A swapping-ground for Regular Expression syntax

Replace dash in foldernames with spaces

Postby axewater » Wed Apr 07, 2010 9:10 pm

Hi everyone

First of all, BRU is a great tool, thanks for making it.

I'm trying to rename a few hundred folders with - in it, to just spaces
The foldernames have dashes because they are based on html filenames I grabbed with WGET
I'll be doing this from a cmd script, so if anything is different when calling from a script, please help with that too (like % becomes %% in FOR commands in scripts)

Examples of foldernames :
Assassins-Creed-2-Bonfire-of-the-Vanities
Bioshock-2
Call-of-Duty-Modern-Warfare-2-Stimulus-Pack
Divinity-2---Ego-Draconis

That last one is a really weird one, hehe, I would like to have it renamed to just a single space

so examples of desired results :
Assassins Creed 2 Bonfire of the Vanities
Bioshock 2
Call of Duty Modern Warfare 2 Stimulus Pack
Divinity 2 Ego Draconis

Please tell me the full BRC32 command line, as most examples in this help section are done in a way I can't comprehend (the answer is spread out over multiple lines ??) ... I just can't grasp the concept of regular expressions yet ...
axewater
 
Posts: 1
Joined: Wed Apr 07, 2010 8:51 pm

Re: Replace dash in foldernames with spaces

Postby shhac » Mon Apr 12, 2010 5:31 am

I looked at the manual that comes with it and I'm assuming that the command line would ultimately look something like this
Code: Select all
brc32 /DIR:"C:\path\to\parent\" /NOFILES /REPLACECI:"-":" " /EXECUTE
I haven't tested it, and used quotes because I don't see how a space is going to be taken as an input otherwise.
Good luck.
shhac
 
Posts: 15
Joined: Tue Sep 11, 2007 10:47 pm


Return to Regular Expressions