Renaming files according to a set of rules
<p>I'm using (or attempting to use) a python script to (at the moment) to remove and alter file names</p>

<p>I'm looking to have a bunch of renaming function all in one script.</p>

<p><strong>Q1</strong></p>

<p>I'd like to know how to do it so do file renames (like removing the '." without having to re-add it for the fileextention at the end.</p>

<p><strong>Q2</strong></p>

<p>I also would like to be able to make a list so I can rename multiple things into the same name without having to have a line for each:
Right now it would be: </p>

<pre><code>[os.rename(f, f.replace('B', 'A')) for f in os.listdir('.') if not f.startswith('.')]
[os.rename(f, f.replace('C', 'A')) for f in os.listdir('.') if not f.startswith('.')]
[os.rename(f, f.replace('D', 'A')) for f in os.listdir('.') if not f.startswith('.')]
[os.rename(f, f.replace('E', 'A')) for f in os.listdir('.') if not f.startswith('.')]
[os.rename(f, f.replace('F', 'A')) for f in os.listdir('.') if not f.startswith('.')]
</code></pre>

<p>I'd Like to be able to put that into some sort of complete "replace B, C, D, E, and/or F </p>

<p><strong>Q3</strong></p>

<p>My third question is how can I make it so I can have it remove all "-" from the filename unless  part of the same is "Coca-Cola" (or something)</p>

<p>At the moment I have a couple lame workarounds.  But they aren't efficient</p>
