Q:  I have several files and i want help the user to choose them in the right sequence. Can I do this with Siren?

         I have this three file and the user should execute them as
         Prepare.cmd first,   then Setup.exe   and at last Finish.vbs

        But if i ship this files the are sorted in Explorer like
        Finish.vbs
        Prepare.cmd
        Setup.exe
       
        Can i sort them in some way to aid the user?



A: Surly you can.

        Use Ctr+B to choose your directory. Single click on it and choose OK
        You can use the filter combo box  to see only files you want to.  (like here   *.cmd;*.exe;*.vbs)

       Select the files in that order YOU want :
        First        Prepare.cmd
        Second   Setup.exe
        Third      Finish.vbs




Use the EXPRESSION:  Step %n of %ns %f

RESULT:
  Step 001 of 003 Prepare.cmd
  Step 002 of 003 Setup.exe
  Step 003 of 003 Finish.vbs



EXPLANATION:
   %n   : the selection number  (there is more, please read the help)
  %ns  : the number of selected files
   %f   : the file name without the path but with extension



What?
You expected something like
  Step 1 of 3 Prepare.cmd
  Step 2 of 3 Setup.exe
  Step 3 of 3 Finish.vbs

OK! big_smile
  Just go to the options (File menu > Options)
  and there in the "Numbers" section.
  Just decrease the "Size"-digit in the "Selection number" section from '3' to '1'.






Press the F1-key while you are in Siren to read more about.
Enjoy Siren,  No installation needed, unzip and run. Siren stores it settings into an ini file, not in the Registry.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

127

(3 replies, posted in How to ...)

Good request RR
> Can Siren ... be told to rename ...fields only where the corresponding tags are present?

and good solution from Rémi.

If one can't remember this RegEx in the future
maybe he can simple sort the 'Track' column
and rename than in two steps... one time select the files with track numbers and use  %mT ..... and then select all the others without %mT ?
This only as work around of course.

128

(3 replies, posted in How to ...)

Thanks for the feedback. It's nice to see this community lives. big_smile

I want to delete from letter 8 until the end.
I need the first seven letters only.


EXAMPLE:
Test001 - start.txt
Test002 - without reboot.txt
Test003 - first run.txt

EXPRESSION: %b(1,7).%e

RESULT:
Test001.txt
Test002.txt
Test003.txt

EXPLANATION:

%b          the hole base file name                                      [Test001 - start]
%b(1,7)   but from the start '1'  the next 7 letters only        [Test001]
.              the dot between file name and extension             [Test001.]
%e          the extension                                                    [Test001.txt]




by the way
the expression %b(7) 
would skip the first six characters
and give you the name from the 7-th character till the end.



Press the F1-key while you are in Siren to read more about.
Enjoy Siren,  No installation needed, unzip and run. Siren stores it settings into an ini file and not into the Registry.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

I want to insert a "-" two letters before the end of the filename.


EXAMPLE:         Test NAME Siren.txt
EXPRESSION:    %b(1,-2) - %b(-2,).*
RESULT:           Test NAME Sir - en.txt




EXPLANATIONS:

%b(1,-2)   the base file name, but only the char from the begin to the second last char    [Test NAME Sir]

-              an space, an dash and an another space                                                    [Test NAME Sir - ]

%b(-2,)    the base file name, but start at the second char from the right, till the end       [Test NAME Sir - en]
.         the dot between file name and extension                                                          [Test NAME Sir - en.]
*        the extension (in this case because it's on the right side of the dot)                      [Test NAME Sir - en.txt]





The expression
%b(1,-2) - %b(-2,).*

could also be
%b(1,-2) - %b(-2).*
or
%b(1,-2) - %b(-2,).%e
or
%b(1,-2) - %f(-7)



Press the F1-key while you are in Siren to read more about.
Enjoy Siren,  No installation needed, unzip and run. Siren stores it settings into an ini file.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

I want to UPPERcase the last 2 letters only.


EXAMPLE:         Test NAME Siren.txt
EXPRESSION:   %lb(1,-2)%ub(-2,).*
RESULT:           test name sirEN.txt




EXPLANATIONS:

%lb(1,-2)%ub(-2,).*

%lb      lower case all chars of the base file name
(1,-2)   but only the char from the begin to the second last char

Test NAME Siren         the hole name
1                               the start at position 1
----------------21         till position 2 from the right



%ub   upper case all chars of the base file name
(-2,)   but start at the second char from the right, till the end
.         the dot between file name and extension
*        the extension (in this case because it's on the right side of the dot)






Press the F1-key while you are in Siren to read more about.
Enjoy Siren,  No installation needed, unzip and run. Siren stores it settings into an ini file.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

Find the ascii value of an char (letter and digit)
and decrease this value (or increase)
and give back the new value:

I have   -  I want +1    -   +3      -  -4
A          -  B                 -    D      -   X
f           -  g                 -    i        -   b
z          -  a                 -    c        -   v
1          -  2                 -    4       -    7

Also find %N  and in -decrease by n  would be needed?

Useful for some funny renaming
and e.g. for to increase numbers in file names.

f.ex. Falco.mp3      => +1    =>  Gbndp.oq4
f.ex. News-003.doc => +1    =>  News-004.doc

I can do this manually but for different values (plus 3, minus 5) i have to modify the expression every time.

Alternatively we must export the names to an editor, use there an script, and re-import the modified names.

133

(2 replies, posted in How to ...)

Leetspeak Leet Leetspeek

%lb("L","1")("Z","2")("E","3")("A","4")("S","5")("B","6")("T","7")("X","8")("G","9")("O","0").*



Leet is a written form of slang used primarily on the Internet, but becoming increasingly common in many online video games,
which uses various combinations of alphanumerics to replace proper letters.
http://de.wikipedia.org/wiki/Leetspeak
http://en.wikipedia.org/wiki/Leet

134

(3 replies, posted in How to ...)

Q:   I have many MP3 files with leading track numbers like:

01-Artist1-Song.mp3
002 - Artist 2 - Song 4.mp3
3 Artist Song.mp3




A:    Because you have used a few different syntax how you add the track numbers .... I would use the power of regular expressions:

EXAMPLE:         
01-Artist1-Song.mp3
002 - Artist 2 - Song 4.mp3
3 Artist Song.mp3


EXPRESSION:    %f(s/(\d+)\s*-*\s*(.+)/$2/)

RESULT:
artist1-song.mp3
artist 2 - song 4.mp3
artist song.mp3




EXPLANATION:
%f(s/(\d+)\s*-*\s*(.+)/$2/)   ==>   %f( s/   (\d+)  \s*  -*  \s*  (.+)   /$2/   )

%f         is the hole file name
(s///)     is the frame of an reg ex  search and replace
so....

(s/         is the start of the reg ex
(...)        is an group. We can refer back to what we have found in this group
(\d+)      \d  means find an digit, .... + means find one or more of this, (...)  means group what we have found, this is our back reference No. 1
\s*         \s  means find an blank/space,.... * means find none or more
-*           -   means  find an dash -,.... * means find none or more
\s*         \s  means find an blank/space,.... * means find none or more
(.+)       . means find any char or sign,...+ means find one or more of this, (...)  means group what we have found, this is our back reference No. 2
/            / means to end the reg ex search and start witht the replacement
$2         $2  means give back what we have found in our second group
/)          /) means this is the end of our journey





OK, a little reg ex explanation:
* means find none or more  ==> means the RegEx match (is true) if the character  is found... or not.
Example:
1-A-S
1 A-S
RegEx: \d-*(.+)  find both because we look for an digit followed by an dash or no dash.


+ means find one or more ==> means the RegEx match (is true) if at least one character is found
Example:
1-A-S
1 A-S
RegEx: \d-+(.+)  find the first only because we must find at least one occurrence




Press the F1-key while you are in Siren to read more about.
Enjoy Siren,  No installation needed, unzip and run. Siren stores it settings into an ini file.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

135

(1 replies, posted in How to ...)

Q:  I have ripped my Madonna Confessions On A Dancefloor CD.

Madonna - Hung up.mp3
Madonna - Get together.mp3
Madonna - Sorry.mp3
Madonna - Future lovers.mp3
Madonna - I love New York.mp3
Madonna - Let it will be.mp3

Now for my MP3-Player i didn't need the artist 'Madonna', how can i do this?






A:  There are more then one way.

The first would be to search for 'Madonna - '  and delete it:

EXAMPLE:          Madonna - Hung up.mp3
EXPRESSION:    %f("Madonna - ","")
RESULT:            Hung up.mp3

String replacement, How does it work ?

   The usage is near of the standard "replace":
   "( "str1", "str2", i1, i2, cs )"
   str1 : string to replace.
   str2 : replacement string.                                               If it is not specified, the string to replace is deleted. (That's what we use here)
   i1   : starting occurrence.                                               If negative, it is relative to the end of the string.
   i2   : number of replacements to do.                               If negative, all remaining occurrences are treated.
   cs   : number indicating if the search is case sensitive:     0 (zero) for no, any other value for yes.

   The last four parameters are optional.
   By default all occurrences are treated and the search is case insensitive.


##########################

Edit:
the simplest way  i have forgotten :-(
Here is it:

EXAMPLE:          Madonna - Hung up.mp3
EXPRESSION:    %f(11)
RESULT:            Hung up.mp3

EXPLANATION:
%f(11)  means skip the first ten chars

Madonna  - 
1234567890
 
and give me the name from the 11-th character till the end.

##########################





An another way (f. ex. if the artist is not always the same) would be to split the name by the '-' into parts:

EXAMPLE:         Madonna - Hung up.mp3
EXPRESSION:   %f[2]
RESULT:           Hung up.mp3

How does it work ?

   The "[]" modifier "splits" the associated string in array elements
   following the characters specified in "Options/Modifications" (or given as second parameter to "[]" .... for example %f[1,"-"] ).

   Each "substring" is reachable through its index.

   In this case, if '-' is one of the separators in "Options/Modifications":
   %f     gives "Madonna - Hung up.mp3"
   %f[1]  gives "Madonna"
   %f[2]  gives "Hung up.mp3"







Press the F1-key while you are in Siren to read more about.
Enjoy Siren,  No installation needed, unzip and run. Siren stores it settings into an ini file, not into the Registry.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

136

(3 replies, posted in Evolution requests)

Hi RR,

the Alpha is tested by an small group first
for to be sure there is no risk to lose your files by an (un-)logically coding mistake.
Stay tuned for the Beta. (I'm sure rplr will post soon for more info)

Best regards
Stefan

137

(12 replies, posted in How to ...)

> Only the Text can be modified
Upps?  sorry!

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

see you
Stefan

138

(1 replies, posted in How to ...)

Some more Info's.

You can also split the name into parts and change the case for each of this parts separately.

( Please read this post first for more about this:  http://scarabee.software.free.fr/forum/ … php?id=148 )


For example
for SONG TITLE.MP3

%b[1]  refers to "SONG"
so we can use
%Lb[1] to get "Song"

and
%Lb[1] %b[2].%e
gives "Song TITLE.MP3"

---

One of my favorites is this for MP3 files:

My rule is
* make every first char of the artist upper case
* make the very first char of the title upper only


So for
EXAMPLE:        peter framton - klavier is what is loves me.mp3
i use the
EXPRESSION:  %Ub[1] - %Lb[2].%ue
to get the
RESULT:         Peter Framton - Klavier is what is loves me.MP3

EXPLANATION:

%b             is the base name                                                                                                                                   [peter framton - klavier is what is loves me]
%b[1]         is one part of the base name which is split by an separator (see the list defined in  "Options/Modifications")  [peter framton]
%Ub[1]       the 'U' means first character of each word upper case, the others lower case.                                            [Peter Framton]
                  The words are separated by the characters specified in "Options/Modifications".

The 'L'         means first character uppercase, the rest lowercase.

The '%e'      itself refers to the extension.
The 'u'         in %ue means all characters upper case.

-------
Note:
you can use an separator "on the fly" which is NOT  specified in "Options/Modifications".
Just use this syntax [1, "sep"] ( again read more in http://scarabee.software.free.fr/forum/ … php?id=148 )



Press the F1-key while you are in Siren to read more about.
Enjoy Siren,  No installation needed, unzip and run. Siren stores it settings into an ini file.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

In Siren YOU can decide which part of the name you want to rename.




Siren uses place holders to refer to this parts of the name.

%b refer to the current "base name" without the path and without the extension.
%e refer to the current extension (the suffix) without the path and without the base name.
%f refer to the hole current name with the extension but without the path.


But you can refer to the path of the file too:

   %p   : the parent directory
   %p2  : the grand parent directory
   %pn  : the nth level parent directory
   %P   : the full path to the file


------------------------------------------

Examples:

For
C:\Program Files\Windows Media Player\Skins\Windows Classic.wmz

%b refers to       Windows Classic
%e refers to       wmz
%f refers to        Windows Classic.wmz
%p refers to       Skins
%p2 refers to     Windows Media Player
%p3 refers to     Program Files
%P refers to       C:\Program Files\Windows Media Player\Skins\


------------------------------------------


So if you want to modify the extension only (here f. ex. to 'bak') just refer to the original "base name"  with %b:
%b.bak

Note that you have to insert the dot on your own.


------------------------------------------


If you want to modify the base name only just use  %e to refer to the original extension with %e:
NewSkin.%e

Note that you have to insert the dot on your own.


------------------------------------------


You can even split the base name into parts and modify each of it own:

Every variable like %b or %f can be postfixed by a "[]" modifier.
It will be split into an array of substrings following the specified separator characters.
The usage is: "[ i , "sep" ]"
   i   : number of the substring to extract.
         If negative, the extraction is done from the end.
   sep : list of separator characters, optional.
         If it is not specified, the list defined in  "Options/Modifications" is used.


Example if SPACE is one of the separator characters  in  "Options/Modifications":

For  "Windows Classic.wmz"
%b[1]  will refer to "Windows"
%b[2]  will refer to "Classic"

------------------------------------------


And that's not all!  There's even more ...


Every variable can be postfixed by a "()" modifier.
This modifier can have several functions, e.g:

- Substring extraction
   The usage is very near of the standard "substr":
   "( pos, nb )"
   pos  : starting position.
          If negative, it is relative to the end of the string.
   nb   : number of characters.
          If it is not specified, the extraction is done until  the end.
          If negative, the number of characters to extract is  computed from the end of the string.



Example:

For  "Windows Classic.wmz"
%b(4)     will refer to "dows Classic.wmz"  skipping the first 3 chars and start with the char No. 4  till the end of string.
%b(1,7)  will refer to "Windows"               gives the first till the seventh char means: start by 1 and give the next 7 chars.


------------------------------------------




Press the F1-key while you are in Siren to read more about.
Enjoy Siren,  No installation needed, unzip and run. Siren stores it settings into an ini file.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

140

(12 replies, posted in How to ...)

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.

141

(12 replies, posted in How to ...)

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


.

142

(12 replies, posted in How to ...)

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?

143

(12 replies, posted in How to ...)

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.

Q:   I have some files
       a.txt
       b.txt
       c.txt
       ...
       j.txt

       Which i have prefixed with an number like
       001a.txt
       002b.txt
       003c.txt
       ...
       010j.txt
   
      How can i number them "down"? Like the first file should have the highest number. i.e.  010a.txt, 009b.txt and 008c.txt





A:       Use Ctr+B to choose your directory. Single click on it and choose OK
          You can use the filter combo box  to see only files you want to. (Here f.ex.   ?.txt )



For the 'normal'  ascending numbering you have done this?

EXAMPLE:        a.txt
EXPRESSION:  %n%f
RESULT:          001a.txt

EXPLANATION:
   %n   : the selection number  (there is more, please read the help)
   %f   : the file name without the path but with extension








To "number down" just click on the column header "Current Name" to sort them in descending order.

Note:
%n represents the selecting order.
If you have select the files before, your numbering in the "Future Name"  column is still in the wrong direction for you.

So just unselect the files (see the button in the toolbar or see the "Select"-menu)
and then click on "Select" again.


If you want only two digits 01, 02 ... instead of 001, 002...
then please take a look in the options (File menu > Options) 
and there in the "Numbers" section.
Just decrease the "Size"-digit in the "Selection number" section from '3' to '2'.




Press the F1-key while you are in Siren to read more about.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

145

(0 replies, posted in How to ...)

Q:    I have some pictures with numbers only like 2.jpg, 3.jpg, 4.jpg.
        How can i 'prefix' this numbers with an name like "Screenshot"


A:    To have an word in front of an digit you could do this.
       Use Ctr+B to choose your directory. Single click on it and choose OK
       You can use the filter combo box  to see only files you want to. (Here f.ex.   ?.jpg )



EXAMPLE:           2.jpg
EXPRESSION:     Screenshot%f
RESULT:             Screenshot2.jpg

or

EXPRESSION:     Screenshot %f
RESULT:             Screenshot 2.jpg

or

EXPRESSION:     Screenshot_%f
RESULT:             Screenshot_2.jpg

or

EXPRESSION:     Screenshot-0%f
RESULT:             Screenshot-02.jpg


or maybe

EXPRESSION:     Screenshot-(0%b).%e
RESULT:             Screenshot-(02).jpg

-----------------------------------------

EXPLANATION:
%f   : the file name without the path but with extension
%b  : the "base" name without the extension
%e  : the name extension






Press the F1-key while you are in Siren to read more about.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

146

(2 replies, posted in Evolution requests)

Very clever this trick, do you want share this in that thread too?
http://scarabee.software.free.fr/forum/ … php?id=136

To shorten the future name if needed (i mean the view in Siren only)
we can replace groups of two or three chars with one dash
or even replace the dash by an comma
%f(s/.../,/g)

Nice :-)

I want to add a leading zero to existing numbers


Q:    I have some picture named
pic1.jpg
pic2.jpg
pic3.jpg
[...]
pic10.jpg
pic11.jpg

Now i want to have all names with two digits by adding an leading zero to the first 9 files.



A:   That's easy with Siren

      Use Ctr+B to choose your directory. Single click on it and choose OK
      You can use the filter combo box  to see only files you want to. 
      e.g.  use      pic?.jpg   if you want to see only files with one char only between  'pic'  and  '.jpg'


EXAMPLE:            pic1.jpg
EXPRESSION:      %NN\0%N.*
RESULT:              pic001.jpg

Thats not completely what we want.
That's because what we see is an default in Siren.
Go to "Files\Options"  or use Ctrl+O
Now go to "Numbers"
Decrease the '3' by "Number contained in base file name"   to '1'

Now our result is
RESULT:              pic01.jpg



EXPLANATION:
%NN  : a non numeric string contained in the base file name a digit can indicate its position (1 by default) [pic]
\0      : adding an zero (we must escape the digit 0 to avoid that %NN will catch the zero as parameter)    [pic0]
%N    : a number contained in the base file name a digit can indicate its position (1 by default)                 [pic01]
.        : an DOT                                                                                                                                  [pic01.]
*       :  the *  means here the extension                                                                                              [pic01.jpg]

Note:  Depending upon the position of the '.' (the dot which delineates  file base name from extension) in an expression, the '*' will  represent either the base name or the extension.







You can solve most of your renaming problem with Siren in different ways.
For example you could use this too

EXPRESSION:  %f(s/(\d)/0\1/)

EXPLANATION:
%f          : Siren:    the hole file name
(s/          : RegEx:  start search and find what follows
(\d)        : RegEx:  search for an single digit  AND group it for backreference
/             :RegEx:  end the search and interpret the following as the replacement
0            :RegEx:   simply an zero
\1           :RegEx:  insert here that what is found in the first group ()
/)           :RegEx:   end search and replace








Press the F1-key while you are in Siren to get some help.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

148

(0 replies, posted in How to ...)

I want to delete the extension



Q:   I want to restore some scripts which my editor has backup and added an additional extension .bak

A:  That's easy with Siren
     Use Ctr+B to choose your directory. Single click on it and choose OK
     You can use the filter combo box  to see only files you want to.



EXAMPLE:        Clean-up.vbs.bak
EXPRESSION:  %b
RESULT:          Clean-up.vbs



EXPLANATION:
%b is the so called base name, means the file name without the extension (.bak)
Because Siren see all after the last dot (first dot from the right) as the extension - all we need to do is clear the (additional-) extension.










Press the F1-key while you are in Siren to get some help.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

I want to change the extension to .mp3


Q:   MP3 files are not allowed in our network.
       So a friend shared some songs (free ones from http://www.deephousepage.com/) with me which he has renamed at home to ".txt"
       That are two dozenths files, how can i rename them back to .mp3 without rename them ony by one?

A:   That's easy with Siren:

       Use Ctr+B to choose your directory. Single click on it and choose OK
       You can use the filter combo box  to see only files you want to. (Here f.ex. .txt)



EXAMPLE:           my new song.txt
EXPRESSION:     %b.mp3
RESULT:             my new song.mp3


EXPLANATION:
%b    is the so called base name, means the file name without the extension [my new song]
.        is an DOT                                                                                       [my new song.]
mp3  is your new extension                                                                       [my new song.mp3]




Press the F1-key while you are in Siren to read more about.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html

I want to number filenames: pic01.jpg, pic02.jpg,...


EXAMPLE: DCRXYZpic.jpg, DCRabcpic.jpg
BEFORE: sort your files as you want (read more...)


EXPRESSION: %b%n.%e
RESULT:  DCRXYZpic001.jpg, DCRabcpic002.jpg

or


EXPRESSION: %n - %b.%e            or   %n - %f
RESULT:  001 - DCRXYZpic.jpg, 002 - DCRabcpic.jpg

or


EXPRESSION: %n - Holiday 2007.%e
RESULT:  001 - Holiday 2007.jpg, 002 - Holiday 2007.jpg


Press the F1-key while you are in Siren to read more about.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html