226

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

Hello,

An undocumented feature enables to extract the beginning or the end of a file.

To extract the beginning:
1) Choose a file by setting the focus on it

2) Press the key sequence:
Ctrl+Alt + a digit (1..9) from the main keyboard (not the numpad)
The value of the digit determines the size of extraction:
1 for 100KB
2 for 200KB
...
9 for 900KB

3) A file dialog opens with the file name field initialized. Change whatever needed.

To extract the end of the file, the procedure is the same as the previous one except for the
first key sequence: Alt has to be replaced by Shift.

Why this function in Siren ?
From a version to the next, the number of metadata types supported grew.
Generally this kind of information is stored at the file begin or end.
To make submit of bugs easier, as a file can be huge, I decided to add this function in v1.40.

Don't know if it can be useful hmm

Maybe wink

227

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

Hello,

To select your files you can use a filter.
Let me give here some explanation.
In Siren the file filters can be used in different places. The most obvious is the "Filter" combobox in the main window. During a directory (tree) scanning only the files passing the filter are taken into account.
You may have noticed that for the selections, highlights ... a filter can also be used.

For example, if you want to automatically select (checkboxes checked) only the "mp3" files, press Ctrl+S (or menu option Select/Select with a filter), enter "*.mp3" (without the ") and click OK.

But that's not all. The filter schema in Siren is not only the standard DOS one. I've extended it to the unix shell one. The help contains a very small description of this. I think it is adapted to your problem.

You surely already know the DOS '?' and '*' characters symbolizing any character (?) or any string (*)
In Siren this list has been extended with: [-]!
This allows you to specify specific character sets or intervals.

For example, if you want only the mp3 files beginning with 'A' or 'B'.
The corresponding filter can be: [AB]*.mp3
For the mp3 files beginning with 'A' to 'Z' it can be: [A-Z]*.mp3
If you don't want mp3 files beginning with 'A' through 'Z', it can be: [!A-Z]*.mp3

Note that I've not invented this, it is part of the standard unix shell.
It has nothing to do with regular expressions.

Let's come back to your problem:
To select/filter ... only the files with base names ending with at least 4 digits, you can use a filter like:
*[0-9][0-9][0-9][0-9].*

Of course you can use ';' (semicolon) to concatenate different filters: *.mp3;*.txt

I hope that this text will help.

228

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

To copy the file names with the full path:
- Select the files as for a rename operation (Ctrl+A for all)
- Set the rename expression to: %fa
(filename with absolute path)
- Press Enter (or click the "recompute" button)

The "Future name"s are now what you were expecting (I hope so wink)

As I wrote in a previous post, right-click the "Future name" column header, choose "Copy selected files data", that's it.

If you need some advice for your rename expression, do not hesitate to post in this forum.

229

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

Hello Tommy,

Stefan is right, Siren can only change file names but maybe the "Copy to clipboard" feature can help you.

All depends on the format of the text file you're talking about.
If it is only a simple list of file names:
- Start Siren, choose the directory
- If you want to list the subdirectories too, click on the "Recurse" button or press Ctrl+F5
- Select the files you want to list (Ctrl+A for all)
- Right click on the "Current name" column header
- Choose "Copy selected files data"
- Open a text file editor and paste the clipboard content

Depending on your needs maybe will you have to modify this file a bit.
If you're familiar with regular expressions a text editor supporting them could be very useful.

For a more complex list, ie if you want full path ... etc ...
- Create the needed rename expression
- Do the previous operations on the "Future name" column

I don't know "Autohotkey" but based on Stefan's expertise I am sure it can be extremely helpful.

Best regards

230

(7 replies, posted in Comments)

Hello,

Stephan, thanks a lot for your support and your interest in this little program.

Like you I would like to wish all a happy Christmas and the best for the upcoming year.

Best regards,

Rémi

231

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

Hello,

geohei wrote:

"expr1 (expr3).ext" should become "expr1 ().ext"
"expr1 (expr2)_expr3.ext1.ext2" should become "expr1 (expr2).ext1.ext2"

I assume there is no underscore in front of "expr3" in the first example (not a typo).
I am not sure to understand the extension problem.

If you work on the file name (%f) an expression like this one should work:
%f("_expr3")("expr3")

The two string deletions are chained:
- on the file name without path, delete all the "_expr3"
- on the resulting string (no "_expr3") delete all the "expr3".

The reverse: %f("expr3")("_expr3")
won't do the job as well. Just after the first deletion as all "expr3" have been deleted, only "_" (underscore) will remain from the "_expr3". The second deletion won't be able do its job.

Best regards

Hello Kristian,

LaKrizzen wrote:

i take a lot of digital photo's and i use siren as the best renaming tool sofar .... its simple and brilliant at the same time ... yet sophisticated for the advanced user

Thanks !

LaKrizzen wrote:

so all in need now is to figure out how the heck the batch file should be like ....

I know the command line usage is a bit tricky ...

Here is what I've understood of your needs:
You want to copy (or rename) files from a specific directory of your card to a specific directory of your hard disk.

I don't know how exactly the ".bat" will be started.
I'll suppose there is the ".bat" in the directory "root/DCIM/100D200" with the files.

Here is an example of a command line you can use:

\Siren /D "." /S "*.jpg;*.nef" /A NEF_ALPHA /P /C /Q

/D "." : means you want to set Siren's current working to the local one. Else it will the last used one
/S "*.jpg;*.nef" : means you want to select all jpg and nef files
/A NEF_ALPHA : means you want to use the expression associated to the favorite named "NEF_ALPHA"
/P : means you don't want to save the changes done in the user interface into the ".ini" file (current directory, expression ...)
/C : means you want to execute a copy. Replace this with /R to do a rename
/Q : means you want to quit after the copy (or rename) has been done

If an error occurs (D disk not available, for example) an error message will be displayed and the Siren will wait for you to click the "OK" button.
Exactly what happens in interactive mode (!= batch).

If your ".bat" file contains more than the Siren call I encourage you to add "start /wait" in front of Siren call line:

start /wait \Siren /D "." /S "*.jpg;*.nef" /A NEF_ALPHA /P /C /Q

So, you'll be sure that the line after this one will be executed once Siren has completely done its work.

I hope this will help.

Regards,

Remi

233

(3 replies, posted in Comments)

Thanks.

Do not hesitate to share your Siren tricks/expressions in the "How to ..." section.

234

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

I'll try to have a look at it.

Bye.

235

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

Hello,

You can use an expression like: %le@%Xdod-%Xdot-c%ncs.%le;%f[2,"@"]

In the "Examples" option of the "?" menu, a similar case is explained: "Rename associated files while renumbering them".

Of course what you need is a bit different but the principle is the same.

If you get
20070726-093747-c.cr2
20070726-093747-c_001.jpg

It's because the extension is not taken into account when "%ncs" is evaluated.
Only the text before it is used.
So, the idea is to temporarily add the extension before "%ncs".

It's done by using sub-expressions (separated by ';').
The first one will add it and make the "computation", the second will delete it.
As we separated the extension from the rest with a '@', the removal is based on the same character.

Hoping this will help.

Best Regards

236

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

geohei wrote:

Is this correct?

Yes, it is.
(Stefan's explanations were very clear, thanks to him)

geohei wrote:

BTW ... The Siren Help (F1) doesn't explain regular expression (all which comes after "s/"). Where do you get these "commands" from (à la (.*), (.+), ...)?

As Siren uses Boost's regular expression code I've preferred to redirect the users to their URLs:
For the format string (part between the first and second '/'), look here
For the replacement string (part between the second and third '/'), look here
For a more "general" help, look here

Regular expressions are widely used. I encourage you to have a look at them.

237

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

Hello,

I will suppose that the modification needed consists to remove the content of the last "()".

The "nicest" solution seems to be the regular expression. Here is one based on the same principle as Stefan's one:
%f(s/(.*\().*(\).*)/$1$2/)

If you want to use a "standard" expression, this heavy one should work:
%f("(",".*",-1)(")","*.",-1);%f[1,"*"](1,-1)\(\)%f[3,"*"](2)

It uses sub-expressions (only available since version 2.00).
The idea is near the same as the one explained in an example accessible though Siren's "?" menu.
A '.' is added to the '*' to keep the spaces before and after the "()".

238

(3 replies, posted in Comments)

Thanks.

I hope you'll like this one.
Do not hesitate to post any feedback.

239

(0 replies, posted in Announcements)

Many thanks to the testers for their help: Anne, Georges and Emmanuel.

A special thank to Stefan for his support.

240

(6 replies, posted in Evolution requests)

They have to be executed once for all (not file selection related) or for each selected files ?

241

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

I think the 1.90 can do it. Maybe not the way you expect.

If I summarize your need:
You want to rename your mp3 with: %ma - %mT - %mt.%e
The problem is that if "%mT" is empty you get an unneeded "- " between the artist and the title.

The idea is here to append to "%mT" the string " - " only if it contains something.

This can be done with a regular expression modifier like: %mT(s/(.+)/$1 - /)

Where:
s/ : indicates that what follows is a regular expression modifier
(.+) : search for any non empty character string and make it usable in the replacement part
/ separates the regular expression from the replacement format
$1 - : is the replacement format. $1 refers to the value of "(.+)" and " - " is fixed text
/ finishes the format string

If "%mT" is empty, "(.+)" is not "found" and so not replaced ...

The final expression will look like: %ma - %mT(s/(.+)/$1 - /)%mt.%e

Hoping it will help.

242

(3 replies, posted in Evolution requests)

If I've made this announcement it's mainly to tell users that the project is not dead. There is always a long period between Siren's releases.

Regarding the alpha version, many modifications have been made. Thanks to the testers and particularly to Stefan.

The final release is far from finished.

243

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

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

244

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

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.

245

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

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.

246

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

If you want sort your files by name length maybe this little "trick" can be useful:

- Select all the files you want to sort in the list
- Use %f(s/./-/g) as rename expression. This way all characters will be replaced by '-' (dash)
(The "Future names" will have the same number of characters as their associated "Current names" and will only differ from each other by their length)
- Click on the "Future name" column header once or twice depending on the sorting order you need

247

(2 replies, posted in Evolution requests)

Why not. I'll think about it.

To sort your files by name length maybe can you use this little "trick":

- Select all the files you want to sort in the list
- Use %f(s/./-/g) as rename expression. This way all characters will be replaced by '-' (dash)
- Click on the "Future name" column header once or twice depending on the sorting order you need.

You can get it with an expression like: %f[2,"[]"] - %f[1] - %Uf[2]

%f[2,"[]"]: the second parameter "[]" tells the array extraction to use '[' and ']' as separators in place of the default ones. So the second element will be "2007"

%f[1]: extracts the first element based on the default separator ('-'). So it will return "foobar"

%Uf[2]: if %f[2] returns "the audio player [2007]" the character modifier 'U' will change the case of this string by setting the first letter of each word uppercase and the rest lowercase.

You can define the default array element separators in "Options/Modifications".

Hoping this will help.

Hi,

Maybe two other solutions to add to Stefan's ones (thanks smile).

%f("."," ",1,4)
You already know %f("."," ") to change every "." with " " (space).
The two "new" parameters: 1 and 4 "tell" to do the replacement from the first "." four times.

The other one can look a bit strange because it uses a regular expression and another method:
%f(s/([a-z])\./$1 /gi)
It will replace all "." following an alphabetic character (from a to z) with a " " (space)

There are surely other ways to achieve it.
All depends on your exact needs.

250

(3 replies, posted in Comments)

Hello,

You can also post any question in the "How to ..." forum.
I am sure you'll get answers wink

Thanks for your support.