Rename dialogue improvements

It would be handy to have a default mode for renaming. The current behavior is to remember the last used mode (simple/complex), but it would be nice to have it always default to simple. I have a shortcut (shift-f2) for complex mode anyway.

Oh, and another useful feature might be automatic detection of the type of complex rename. For example, when renaming a file in complex mode if I type a backslash, Opus would automatically switch to regular expressions mode.

Another handy feature would be pre-processors for renaming, particularly with regular expressions. For example, underscores could be converted to spaces before the regular expression is executed, which would be handy for dealing with Usenet downloads. Removal of double spaces would be another useful one.

Maybe even a little list of presets for complex renaming. I currently use the history feature as a sort of preset list.

You can make the default buttons/keys always use simple mode in exactly the same way you made your shift-F2 key always use complex mode:

Rename SIMPLE

The backslash is valid in simple mode as well; it lets you rename files into subdirectories. I don't think there could be any reliable way to auto-detect rename mode by the inputs.

Easy way to do that now is to create some buttons/keys which you can run on the files before the main rename. For example, I have these two on the right- and middle-click actions of my Rename button, so I can quickly do two common tasks:

rename PATTERN="_" TO=" " FINDREP
@NODESELECT

and

rename CASE=allwords
@NODESELECT

The @NODESELECT means the files will remain selected ready for the next action.

You can make the default buttons/keys always use simple mode in exactly the same way you made your shift-F2 key always use complex mode:
[/quote]

Ah yes, good point. Thanks for that.

Unless you don't use the rename into subdirectory feature. A simple toggle switch would allow the user to turn this on and off, for 100% reliable detection.

That's quite a nice solution for now, and I have set my rename button up that way.

Some presets would still be nice though, as often groups release fansubbed videos with standard file name, which I need to clean up. There are maybe five different common ones I use, and it would take up a lot of keys.

Is there any way to do a complex rename, with the mode automatically set to regular expressions?

It would be a bit confusing then, I think, since the option for one feature would control another, plus the mode automatically changing if you tried to use a feature you didn't realise was turned off, or just accidentally typed a slash...

Additionally, not all regexp renames will use a slash at all (although that is rare it does still happen sometimes).

For something like that I would probably make a button or key which toggles an additional toolbar down the side of the window which has all the presets in it. I could then click each one of the presets and then a final button which closes the toolbar. Have a look at the Flat View Toolbar for an example of this.

Yup:

Rename PRESET=regexp

[quote="nudel"]

[quote="mojo-chan"]Is there any way to do a complex rename, with the mode automatically set to regular expressions?[/quote]Yup:

Rename PRESET=regexp[/quote]

"If you aren't getting the right answers, you most likely aren't asking the right questions."

I was looking for something that did this recently to no avail. I almost never use anything but RegExp these days.

I found it by looking through the drop-down list of arguments for the Rename command in the (advanced) button editor dialog. Always worth remembering that's there as it's usually a good place to start looking (and more up-to-date than the manual).

Oh this option is documented. But it was the second or third sentence, and I just quickly skimmed what the Preset parameter did and decided it wasn't going help me.

Opus is one application where users should research not only what they are trying to do at the moment, but one where they should take a moment to look around and see what else can be accomplished that is similar.

Thanks for the tips Nudel, very much appreciated!

Opus is a really powerful program, it's just that there are so many options and so much documentation for it all... and a lot of it is spread around the program which can make even finding it hard.

I have decided to look into writing a program to deal with Usenet downloads. It should be possible to make something that checks the CRCs, figures out the file name format and renames everything, then creates an SFV file. Back in the day, I would have done it with ARexx and interfaced directly with Opus, but sadly universal and simple scripting is something Windows lacks.

Windows has Active Scripting (VBScript, Perl, etc., controlling other programs via scriptable COM interfaces) which can do pretty much anything that ARexx could. The problem is that fewer programs provide scriptable interfaces which isn't really the fault of Windows (but is still a fact of Windows, I agree).

There are a few programs already for sorting, checking, repairing (PAR etc.) and extracting Usenet downloads automatically. I'm not sure which the best ones are and haven't really used them myself (apart from DLDone for some very simple stuff) or if you want to do something that they don't, but if you haven't heard of them have a look at DLDone and RARSlave and some of the others you'll find via googling for those two programs.

It's true that Windows has a few scripting languages, but I wouldn't consider any of them close to ARexx. Apart from the lack of application support which you mention, they are not anything like as simple. Simplicity was they key to ARexx I think.

I'm a competant programmer, usually using C and assembler. I loved ARexx because it was easy - typeless variables, simple BASIC like statements and structure, and no complex stuff I had to keep looking up. I could dip into it occasionally without problems.

VB script, while no doubt powerful, is a lot more work. I have not tried Perl for years, but it looks a bit bloated for a scripting language, and the Windows port used to be horrible. Maybe it's better now.

As for download management programs, I have tried a few, but none are really that good. For what it's worth parnrar is about the best I think.

Sounds a lot like VBScript to me. Of course when you're unfamiliar with it or, more importantly, the interfaces provided by the programs you're talking to with it then you'll be looking things up but the same was true of ARexx.

Perl is, in my opinion, a complete abomination. And I say that as someone who isn't a fan of VBScript, either. :slight_smile:

We are getting a bit off-topic here, but what the hay.

The biggest issue I have with VBScript is actually similar to the one I have with VisualBasic. Everything seems to rely on modules, there are not enough built in commands. VisualBasic isn't too bad because the editor helps you find methods and their syntax once you know the module name, but with a scripting language written in a text editor that doesn't work.

As you say, with ARexx you had a similar problem in that you needed to know the interface of each particular program, but IMHO it was still easier because the basics were that much simpler.

There are a few REXX compilers for Windows, and this conversation has stired me to look into them.