Topic: Re: Wish:A {File,Rename} comand. (1 of 5), Read 45 times
Conf: VEDIT Beta Test
From: Christian Ziemski
Date: Thursday, March 23, 2006 12:47 PM

On Thu, 23 Mar 2006 10:33:00 -0500, Peter Rejto wrote:

>On 3/22/2006 2:04:09 PM, Christian Ziemski wrote:
>>
>>Select files: (.*)\.htm
>>Rename to: \1.html
>
>This worked like a charm for me!

Good.

>Now a self-survey:
>
>At present, I shall not use the full force of this powerfull
>utility. I shall restrict my self to your special case #1.
>That is to say, to renaming filename extensions.

I assume you are refering to example 1 listed by the macro.

>Then I shall insert the regular expression strings, (.*).
>and \1. into the appropriate Text-Registers.

Into the input boxes of the dialog, yes.


>Then, I hope, that all that I have to do is to type in the
>old and new extensions.

Some details about my above example:

The Regexp for selecting some files is (.*)\.htm

The second part of it, the \. means a real dot (escaped by the
backslash).

The third part is the filename extension, here htm.

And the first part of it, the (.*) is the leading part of the filename
(in combination with the rest: up to the extension's dot, but without
it). The parentheses create a group, which is refered to as \1 in the
"Rename to" input box.


>These adjustments look pretty minor to my untrained eyes.
>If you have the time, I would appreciate your doing them.

?? What should I do? I don't understand.

If you mean to change the documentation (the examples of the macro),
that is already done and will be included in the final 6.15 I think.


Christian

 


Topic: Re: Wish:A {File,Rename} comand. (2 of 5), Read 37 times
Conf: VEDIT Beta Test
From: Peter Rejto
Date: Thursday, March 23, 2006 06:25 PM

On 3/23/2006 12:47:15 PM, Christian Ziemski wrote:

>I assume you are referring to example 1
>listed by the macro.

Yes, I do.

Thanks Christian for your very detailed answer. It certainly helped me to organize my thoughts.

Let me continue with my self-survey.
I would like to have a slight enhancement of the special case of example 1 of your macro: Specifically, I would like to type in the old filename extension and the new filename extension. However, instead of typing in the corresponding Regexp strings, I would like to save them in T-Registers.

Is this slight enhancement possible??? I do not know!

I have a hunch that it is indeed possible.
Here is how I would try to implement this slight enhancement:

I would put your first Regexp string (.*)\. into
T-Reg 78 and the second one, \1 , into T-Reg 79. The, I would append the old filename extension to T-Reg 78 and the new filename extension to T-Reg 79.

Finally, I would try to run your macro with my appended T-Reg 78 in place your T-reg 90 and with my appended T-Reg 79 in place of your T-Reg 91.

In short, I would add your old filename (.*)\.html in two installments. Similarly, I would add the new filename in two installments as well.

I do not know why I have so much trouble desrcibing this simple idea.

Thanks again for everything.

-peter.

 


Topic: Re: Wish:A {File,Rename} comand. (3 of 5), Read 38 times
Conf: VEDIT Beta Test
From: Christian Ziemski
Date: Friday, March 24, 2006 03:44 AM

On 3/23/2006 6:25:07 PM, Peter Rejto wrote:

> Thanks Christian for your very detailed answer. It certainly helped me to organize my thoughts.

Regular expressions are very powerful but not easy to understand.
And they are not easy to describe...
So please read VEDIT's online docu or any other description for details.


> Let me continue with my self-survey.
> I would like to have a slight enhancement of the special case of example 1 of your macro:

The REN-FILE macro is designed to be as flexible as possible.
So I will not implement any special cases! Sorry.


> Specifically, I would like to type in the old filename extension and the new filename extension.
> However, instead of typing in the corresponding Regexp strings, I would like to save them in T-Registers.

As far as I can see you want to have a special file-extension-renaming-utility.

Please feel free to use REN-FILE as template and change it to your needs, by yourself.


Christian

 


Topic: Re: Wish:A {File,Rename} comand. (4 of 5), Read 36 times
Conf: VEDIT Beta Test
From: Peter Rejto
Date: Friday, March 24, 2006 04:39 PM

On 3/24/2006 3:44:48 AM, Christian Ziemski wrote:

>Please feel free to use REN-FILE as
>template and change it to your needs, by
>yourself.

Thanks Christian:

I just did it. Since you did a wonderful job of writing your macro, all I needed was to add 4 lines of code.


It seems to work for me. I am trying to upload it.

Thanks again.

-peter

 


Topic: Re: Wish:A {File,Rename} comand. (5 of 5), Read 40 times, 1 File Attachment
Conf: VEDIT Beta Test
From: Peter Rejto
Date: Friday, March 24, 2006 05:03 PM

Oops,

Once again, I had trouble with uploading.
(My computer timed out)

I try again.

-peter.

 
Slight enhancement of a special Ren-Fi