Topic: Batch-Renaming

Hi there!

First of all: What a great Program! Seems to be exactly what i was looking for for ages. But i don´t get it correctly working 'til now :-( But let me explain what i want to do, maybe i even can´t realise it??
I want to have two small files i can run (a *.bat for example), one to append a number with three digits to the left of the filename, and a second one to remove that again. That everything should be recursive. And I don´t want to click anything more than just on one file.
So i tried creating a batchfile, but i didn´t get it run. I tried it with something like:
siren.exe /P /T /F *.mp3 /F *.wma /S *.mp3 /S *.wma /E %AT_%f /R /Q
But it didn´t work :-( Could someone please help me with creating it? Or at least post an example for a similar batch? I couldn´t find any *bat-example in the Net... Basicly I just want to rename Filename.mp3 to 001_Filename.mp3 (and later back). The "001" should be, in the best case, the Track Number given by the ID3Tag.

I would be so greatful if someone could help me!!!
Thanks for everyone who has an Idea - Daniel


PS: I saw a Topic in German - if it´s better for someone: Feel free to write in German back! At least from my Point-of-View it wouldn´t be any Problem ;-)

2 (edited by Stefan 2007-05-28 01:09:15)

Re: Batch-Renaming

Hi Daknee and welcome to the community.
I prefer to wrote in english so the hole world can get use from this big_smile big_smile big_smile
Aber wenn es Dir hilf kann ich die Vorgehensweise auch einmal in Deutsch erklären.


Did you read this posts?
http://scarabee.software.free.fr/forum/ … .php?id=93
http://scarabee.software.free.fr/forum/ … .php?id=89


If you have found an (Siren rename) expression once that fit your needs
you can store this as an favorite.
Then you can call Siren to execute an renaming with the expression stored in this favorite.

So first step first:
EXAMPLE FILE:  Filename.mp3
EXPRESSION:   %mT_%f
RESULT:          01_Filename.mp3


EXAMPLE FILE:  01_Filename.mp3
EXPRESSION:   %f(4)
RESULT:          Filename.mp3



EXPLANATION:
   %mT  : the track number
   %f      : the file name without the path but with extension
   %f(4) : gives the file name starting from position 4, deleting the first 3 chars.
For more parameters press F1 in Siren and then Ctrl+F (Strg+F)  and search for "Group of "id3v1 tag" information: mp2, mp3, mpc"




Then store this as two favorites. See the "Favorites"-menu.
After that you can start Siren by drag and drop files at an shortcut to Siren (Read more...)





For the 'command line' commands of Siren start Siren with the /? parameter: siren.exe /?
Here  is in short what you will see:
/? : this window
/I : the next parameter is the name of the ".ini" file to use
/E : the next parameter is a rename expression
/A : the next parameter is the name (case sensitive) of a       favorite expression
/F : the next parameter is a file loading filter
/S : the next parameter is a file selection filter
/D : the next parameter is a directory name to load
/T : force the recursive loading mode
/N : force the non recursive loading mode
/P : do not save configuration data in the ".ini" file       (directories, expressions, options ...)
/R : rename
/Q : quit



To provide you an completely command line i must investigate a little bit on my own. Or rplr will be faster.  Stay tuned.
I used to rename from Siren it self or from Total Commander.

3 (edited by Stefan 2007-05-28 01:02:14)

Re: Batch-Renaming

Hi Daniel.

> "siren.exe /P /T /F *.mp3 /F *.wma /S *.mp3 /S *.wma /E %AT_%f /R /Q "
i see you are on the right track


> But it didn´t work :-(
What did not work?
Are you sure you can access the Siren.exe and the song files?  I mean did your path fit?
Did your paths contain blanks (spaces, Leerzeichen) ?  Did you used Quotes (Anführungszeichen " " ) ?


Can you please answer a few questions first?
1) Path to your SIren.Exe
2) Path to your files for renaming
3) Maybe your batch it self?

4 (edited by Daknee 2007-05-28 11:26:25)

Re: Batch-Renaming

Hi Stefan!

Thanks for *that* fast reply, whoa! And for your effort, you wrote really much - and the best: I understood it :-D
Ok, bit more serious: By "didn´t work" (i know, i know - not really an error description... *g*) i mean i started the command (see above) by *.bat, it worked for a second, then it closed and - nothing happend ;-) I started it without the /Q switch to see whats up, and siren came up with the correct files, but none selected, and no rename was started. Curious, cause ain´t that exactly what the /R switch is for?
Anyhow, then I thought about handing the Expression over an seperate *.ini out (even if that would mean i´d have alot of more files in the root directory; but if it´d work...), but had the same problems like with the 'pure' batch file.
Im not really shure about the syntax, for example do i have to use '/F *.mp3' or '/F*.mp3' instead of '/F:*.mp3' or should i combine it with the next one '/F *.mp3; *.wma' or or or....
Ok, and now for your questions :-D
I put (for Testing at least) the siren.exe, the corresponding *.ini and the *.bat into the same folder where some testing-mp3s are. So my complete Path to all is the same. Exactly: All files are in the Folder
C:\Dokumente und Einstellungen\Administrator\Desktop\Auto Rename Test\Testing

As I don´t want to use absolute Paths The command in the *.bat file is the same as above written.
Maybe a last information about what i want to do: I have a mp3-Player, and correct named and tagged files. But the Player unfortunatly does it´s sorting via the old 8.3-Scheme. In order to play the Albums in its correct order, i need to put a ascending number in front of it. As it destroys my namingformat of the files (%artist% - %album% - %track% - %title%), i need a possibility to 'undo' this action. And, of course, only for the audiofiles....

Puhh, that was a long post, but hopefully you can get me on the right track. Let me say a second time 'thanks' for the great helping! Cheers!

Daniel


Edit: I have overlooked a question from you:
> Did your paths contain blanks (spaces, Leerzeichen) ?  Did you used Quotes (Anführungszeichen " " ) ?
Yes, it contains blanks. And i didn´t use Quotationmarks, as i thought 'everything is in the same path, forget about that' Maybe theres an error? But how & what should i quote? The whole command itself? Only the switches like "/F *.mp3" ?

Re: Batch-Renaming

Hi Daniel,
you didn't post your batch so i have to guess.


1)   Your have Siren.exe with the ini and the sound files in the same  folder. So we can forget the space and quote thinggy.
> I put (for Testing at least) the siren.exe, the corresponding *.ini and the *.bat into the same folder where some testing-mp3s are



2) you use a batch like
@ECHO OFF
siren.exe /P /T /F *.mp3 /F *.wma /S *.mp3 /S *.wma /E %AT_%f /R /Q



3) Let's take an look at the syntax:
/? : this window
/I : the next parameter is the name of the ".ini" file to use
/E : the next parameter is a rename expression
/A : the next parameter is the name (case sensitive) of a       favorite expression
/F : the next parameter is a file loading filter
/S : the next parameter is a file selection filter
/D : the next parameter is a directory name to load
/T : force the recursive loading mode
/N : force the non recursive loading mode
/P : do not save configuration data in the ".ini" file       (directories, expressions, options ...)
/R : rename
/Q : quit

OK, i have to test this on my own....




4) my batch is as follow
@ECHO OFF
siren.exe /P /T /F *.mp3 /F *.wma /S *.mp3 /S *.wma /E %AT_%f
PAUSE

I add the PAUSE command and i  delete "/R /Q "  to see what's going on.





5) In Siren the filter is set to *.WMA only.
Since i read the help in Siren i know i can set the filter like this:   *.mp3;*.wma
So i modify my batch to:
@ECHO OFF
siren.exe /P /T /F *.mp3;*.wma /S *.mp3;*.wma /E %AT_%f
PAUSE




6) NOW i see some files in Siren (because i have mp3 only and the filter is now set correctly)
But the EXPRESSION is an single 'f'  only.?!?




7) This works:
save
%AT_%f
as an favorite named 'test'
and use this in the batch:

@ECHO OFF
siren.exe /P /T /F *.mp3;*.wma /S *.mp3;*.wma /A test
REM E %AT_%f
PAUSE




8) Ahhhrrg, i'm so stupid.
Batch curse level one: double the %-chars in an batch (because the interpreter deletes one)



so use an syntax like this:
siren.exe /P /T /F *.mp3;*.wma /S *.mp3;*.wma /E %%AT_%%f /R /Q


.

6 (edited by Stefan 2007-05-28 13:04:11)

Re: Batch-Renaming

Aahhhrrg, even more worse for me.

Siren 1.90  >   '?' -menu   >   Command line   >     - In a batch program or under Windows98, the '%' have to  be doubled.

RTFM big_smile


---
Edit:

If this helps you Daniel
so please modify your Subject
from "Batch-Renaming doesnt work at all :-/"   
to "Solved: Batch-Renaming doesnt work at all :-/"

and post one or two other how to's in your own words if you can. No matter what and how.  Thanks.

Re: Batch-Renaming

Something near what wrote Stefan:
<siren directory>\siren /P /T /F *.mp3;*.wma /S * /D . /E "%%AT_%%f" /R /Q

/S * : As the filter has done its job you can select all the listed files
/D . or /D <your directory> : This way you can have only one copy of Siren.exe (.ini current directory will be replaced by the one given as parameter)
Parameters have to be enclosed in '"' if they contain spaces or special characters
As the expression is in a "bat" file, the '%' have to be doubled
There must be a space between the parameter "name" and its associated parameter (ie: /F *.mp3)
You already know the other parameters

Hoping it will worth your efforts.
If your final goal is to copy the renamed files to your mp3-player, the upcoming version of Siren should help you.

8 (edited by Daknee 2007-05-28 20:57:09)

Re: Batch-Renaming

Hey! Thank you both so much!!!
Yes, it works :-D

Juhuuuuu!

I must admit, alone i would have been lost. I can´t say enough Thanks! How cool that you could help me - and that fast - whoa! I will see what a 'how-to' i can contribute, and then write it down here. I thought about the following: For shure i´m not the only one who has that Problem with the mp3-Player - it only sorts on 8.3 roll And its relative new. Anyhow; wouldn´t a 'precompiled' Package be a good Idea? Its really easy, just one file for 'lock' sorting, and one to 'unlock' again. If you want to, i could add "my" batch file (to be exact: ours *g* to be more exact: yours *gg*). Or try to write a little basic, it could get compiled to exe? Its just an Idea. And of course lets see what the new release could bring....? wink

Oh, and one Addition: I found out that using %np is even better: Cause when you have an Album with more than one CD and per CD Tracknumbers starting with 01 you have in that Folder two 01-Files, two 02-Files. The Command Line argument now looks like following:
siren /P /T /F *.mp3;*.wma /S * /D . /E "%%np_%%f" /R /Q
del siren.ini  REM This is because of there still gets a siren.ini created, containing the Version-Number

Once again, thank you, now i´m happy :-D
Wish you the best, Greets!
Daniel



Edit: @Stefan: I wish I could change the Threadtitle - but i can´t neutral Only the Text can be modified.....

Re: Batch-Renaming

> Only the Text can be modified
Upps?  sorry!

Fine it works for you.
Thank you for the feedback.

see you
Stefan

Re: Batch-Renaming

Guten Tag,

Glad to know you've finally made it work.
Sorry if the "documentation" is not very clear.

About the subject modification, have you to tried to "Edit" your first post of this topic ?
The subject seems to be associated to it.

Re: Batch-Renaming

Yes, I tried to edit my first post. I think thats nearly always in Forums like that... But I can only edit the Text, the Subject is still there, but no possibility to edit. I mean, its normal Text, not a Box or st like that... Sorry!

See you soon!
Daniel

Re: Batch-Renaming

Ok.
I change it, tell me this version is ok for you.

Re: Batch-Renaming

Yes for shure! :-D The Main Point is that you are pleased with it ;-)