#1 2022-10-30 21:23

Owyn
Member
Registered: 2022-10-30
Posts: 8

Quick rule \ quick edit rule - suggestion

Would be nice if we could instead of making\editing rules to do something - just use an input box with the selected rule (or with the only one rule if it's the only one and nothing is selected) to do the action by quickly dragging a file onto the program, writing the text into the input box for the rule you usually use (but I have to input a different value for the rule each time, so I'd have to make new rule every program run :-( ) and hitting Enter for it to be done

Here, I've made a picture
f5078f64356616ad4585de777e1dac4b.png

I've searched the internet, github and the superuser (stackoverflow) for such program but this one is the closest to what I need, I hope such improvement could be made.

Offline

#2 2022-11-09 14:37

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Quick rule \ quick edit rule - suggestion

This it is not really feasible.

Renaming rules have a lot of different options which simply can't fit into a single input field.

Offline

#3 2022-11-09 15:27

Owyn
Member
Registered: 2022-10-30
Posts: 8

Re: Quick rule \ quick edit rule - suggestion

den4b wrote:

This it is not really feasible.

Renaming rules have a lot of different options which simply can't fit into a single input field.

Well, I personally don't need this for all the options, just for this one which doesn't really have options (and the one it has - I won't be needing to quick-change, and I doubt others will?)

usage example - I want to organize my folders by adding artist name to files, and for EACH artist I would have to create its own rule I would use ... only ONCE, and I'll have to enable\disable that rule after using it, so I thought I'd suggest this so I could just quickly enter the artist name into that text input and hit Enter - just once action basically if you don't count Enter

Offline

#4 2022-11-10 21:37

jogiwer
Member
From: Germany
Registered: 2022-11-05
Posts: 66

Re: Quick rule \ quick edit rule - suggestion

You should think about using PascalScript with just a small function wich asks for input via one of these:

function WideInputBox(const ACaption, APrompt, ADefault: WideString): WideString;
function WideInputQuery(const ACaption, APrompt: WideString; var Value: WideString): Boolean;

This function would be called for every single file. If you keep the last entered value in a variable and as default you could use the same artist for some files in a row by just clicking OK.

Offline

#5 2022-11-10 22:19

jogiwer
Member
From: Germany
Registered: 2022-11-05
Posts: 66

Re: Quick rule \ quick edit rule - suggestion

Something like this:

var
  Prepend: WideString;
begin
  if WideInputQuery('Prepend string',
                    'Enter the string to prepend to the'#13'file: "' + Filename + '"'#13'path: "'+ WideExtractFilePath(FilePath) + '"',
                    Prepend) then
  begin
    Filename := Prepend + Filename;
  end;
end. 

Last edited by jogiwer (2022-11-10 22:20)

Offline

#6 2022-11-10 23:09

jogiwer
Member
From: Germany
Registered: 2022-11-05
Posts: 66

Re: Quick rule \ quick edit rule - suggestion

Owyn wrote:

...
usage example - I want to organize my folders by adding artist name to files, and for EACH artist I would have to create its own rule I would use ... only ONCE, and I'll have to enable\disable that rule after using it, so I thought I'd suggest this so I could just quickly enter the artist name into that text input and hit Enter - just once action basically if you don't count Enter

If you really want to use artist names I recommend to use a good tagging tool to put this info right into your files - assuming we are talking about music here.
The build up your ruleset and use the insert rule to add the wanted meta-tag like ":MP3_AlbumArtist:"

BTW: my favorite player and tagger is foobar2000

Offline

#7 2022-11-11 00:02

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Quick rule \ quick edit rule - suggestion

jogiwer wrote:

Something like this...

Yes, and maybe combined with an initialization routine to ask for the prefix only once per Preview, rather than for each file in a Preview.

var
  Initialized: Boolean;
  Prefix: WideString;

begin
  if not Initialized then
  begin
    Prefix := WideInputBox('Insert', 'Prefix:', '');
    Initialized := True;
  end;
  FileName := Prefix + FileName;
end.

Offline

#8 2022-11-11 12:47

Owyn
Member
Registered: 2022-10-30
Posts: 8

Re: Quick rule \ quick edit rule - suggestion

jogiwer wrote:
Owyn wrote:

...
usage example - I want to organize my folders by adding artist name to files, and for EACH artist I would have to create its own rule I would use ... only ONCE, and I'll have to enable\disable that rule after using it, so I thought I'd suggest this so I could just quickly enter the artist name into that text input and hit Enter - just once action basically if you don't count Enter

If you really want to use artist names I recommend to use a good tagging tool to put this info right into your files - assuming we are talking about music here.
The build up your ruleset and use the insert rule to add the wanted meta-tag like ":MP3_AlbumArtist:"

BTW: my favorite player and tagger is foobar2000

It's about pictures and videos, not MP3 files with actual tags, so there is no choice but to input artists by hand

den4b wrote:

ask for the prefix only once per Preview, rather than for each file in a Preview.

yea, that's much better,
still, there's an issue - it asks me for prefix each time I add files there or when I enable or disable ANY rules, not just when I press "Rename",

so if I add one file - it asks me, if I add another - it asks again - and totally ignores my previous answer,
e.g. I said PREFIX1 1st time and PREFIX2 2nd time and after I added both files now there's only PREFIX2 at start of both files and my 1st answer was basically useless

can it ask for input when pressing Rename? (or at least remember my 1st answer and not ask again when adding more files?)

I found a good way - to keep the script turned off before finishing adding all files AND before turning on all the other rules - e.g. to turn the script's rule THE LAST, - because it asks for input every time ANY rule is enabled - not just the rule of the script itself, - is it a bug perhaps?

Last edited by Owyn (2022-11-11 12:49)

Offline

#9 2022-11-11 13:15

jogiwer
Member
From: Germany
Registered: 2022-11-05
Posts: 66

Re: Quick rule \ quick edit rule - suggestion

Rules are run while previewing not in the renaming phase.

You might have set your options to update the preview each time you

  • change rules

  • add files

To prevent ReNamer from asking you that much you could

  • switch off these options and start preview only manually

  • disable the rule while "setting up" things

PS: I'm not sure if you want to be asked only once for all files or more often ... I understood the 1st post as you have different artists in your file set so more than one prompt is needed

Last edited by jogiwer (2022-11-11 13:19)

Offline

#10 2022-11-11 13:35

Owyn
Member
Registered: 2022-10-30
Posts: 8

Re: Quick rule \ quick edit rule - suggestion

jogiwer wrote:

PS: I'm not sure if you want to be asked only once for all files or more often ... I understood the 1st post as you have different artists in your file set so more than one prompt is needed

Even if it gives you more than one prompt - it'd still use only the last answer you give it ignoring all previous ones...

P.S. - I clear files tab after the rename to proceed to the next batch, renaming little by little (one artist at a time), not everything together

disable updating the preview each time you ...

but then I won't see the preview  sad

Last edited by Owyn (2022-11-11 13:39)

Offline

Board footer

Powered by FluxBB