BRC: Replacing COMMA with SPACE HYPHEN

Post any Bulk Rename Command support requirements here. Open to all registered users.

BRC: Replacing COMMA with SPACE HYPHEN

Postby vixenfinder » Wed Nov 26, 2008 10:56 am

Okay so I'm working trying to develop my first batch file and some of the folders have a comma and I'm trying to replace the comma with a space hyphen. I'm not sure if I have my batch script right
Code: Select all
CALL "C:\Program Files\Bulk Rename Utility\Bulk Rename Command\BRC32.exe" /DIR:"C:\Users\Etc.\Etc.\Etc.\Etc.\"  /RECURSIVE /NOFILES /REPLACECI:",":" -" /REPLACECI:"(www.website.com)":"[website]" /EXECUTE


Furthermore, does anyone know of a command line that can search through my subfolders and delete files with a specific name?

EDIT: Okay; I've managed to figure out the comma replacing with space hyphen issue but now I'm having issues with the file names with Parenthesis around them. Eg: example_(http://www.website.com).zip TO example_[website].zip and I can't seem to get the command right for that. Any ideas?

P.S.: Those who want to follow up on the batch command deleting specific files; well the answer is
Code: Select all
DEL <filepath>  *filename*.* /S /Q
vixenfinder
 
Posts: 2
Joined: Thu Aug 07, 2008 7:20 am

Re: BRC: Replacing COMMA with SPACE HYPHEN

Postby audiogalaxy » Fri Aug 21, 2009 4:16 am

vixenfinder wrote:Okay so I'm working trying to develop my first batch file and some of the folders have a comma and I'm trying to replace the comma with a space hyphen. I'm not sure if I have my batch script right
Code: Select all
CALL "C:\Program Files\Bulk Rename Utility\Bulk Rename Command\BRC32.exe" /DIR:"C:\Users\Etc.\Etc.\Etc.\Etc.\"  /RECURSIVE /NOFILES /REPLACECI:",":" -" /REPLACECI:"(www.website.com)":"[website]" /EXECUTE


Furthermore, does anyone know of a command line that can search through my subfolders and delete files with a specific name?

EDIT: Okay; I've managed to figure out the comma replacing with space hyphen issue but now I'm having issues with the file names with Parenthesis around them. Eg: example_(http://www.website.com).zip TO example_[website].zip and I can't seem to get the command right for that. Any ideas?

P.S.: Those who want to follow up on the batch command deleting specific files; well the answer is
Code: Select all
DEL <filepath>  *filename*.* /S /Q


man, YOU have solved MY problem!!!!!

i can't understand from the hel file that in the replaceci i can use the " <-- !!!
So vixenfinder, I HAVE yo help you!!!

I have a problem with this colon (":") ... i think it's impossible to find out a http:// ... nor the slash or backslash are allowed chars, neither colon are accepted characters.

So, given that your scenario couldn't contain these chars, I think something like


[blahblah] /REPLACECI:"(www.":"[" /REPLACECI:")":"]" /EXECUTE

could help.

you can't expect what TLD you'll find (.org, .com, .net, .uk, .de ...) ... but if you want, you can list the most found in your experience and add as much /REPLACECI:".TLD)":"]" as you want :-)


Or if you're skilled with regexp... you can do what you want, select what you want ... it's great. But i'm not the right person to teach you something with regex, for now.

I hope to help you as much as YOU helped me...

... let me explain: i don't knew that the "replaceci" switch accepted parameters between quotes! But reading your example i've understand that's possible!

In that way i can eradicate all the spaces in my f*** directories! :)

good bye!
audiogalaxy
 
Posts: 23
Joined: Thu Nov 20, 2008 10:56 am

Re: BRC: Replacing COMMA with SPACE HYPHEN

Postby renamer » Fri Mar 26, 2010 1:45 pm

Thank you very much for the people who are posting on this. It is really big help me. I make my work easier than before. And I fixed my problem already on how to replacing Comma with Space on Hyphen.
Thank you so much..hope more people you will be helping with your knowledge.
renamer
 
Posts: 1
Joined: Fri Mar 26, 2010 1:39 pm


Return to BRC Support