gcmd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gcmd-usr] advrename: safe rename (two steps)


From: Uwe Scholz
Subject: Re: [gcmd-usr] advrename: safe rename (two steps)
Date: Sun, 12 Jan 2020 22:21:11 +0100

Nice idea, Michael!

I would have to check how this can be implemented in the code. I have
no idea how the current rename algorithm works and how it stores the
list of old and new filenames. But I would bet that it is very
straight forward: rename each file step by step...

In the approach how you describe it we would have to create another
element in the list of names: besides old name and new name we would
now also have the intermediate name.

Problem could occur if a file exists already having the intermediate
name and if the files change on disk while the renaming of all the
selected files happens.

I could imagine that one could somehow improve the renaming of files in
a way that we would not even need the intermediate filename at all, by
just starting at a different file position. Hm... Any idea about that?

Sorry, it is quite late for me, I did not think about that for more
than two minutes now. ;-)

Best
Uwe

Am Thu, 9 Jan 2020 03:56:21 +0100 schrieb mi:
>
> I'm often renaming large numbers of files and sometimes there's
> naming conflict. However gcmd does not warn about these before it's
> already screwed ...
>
> I thought about it. Probably in most cases, we do not really want to
> bother resolve conflicts - we just want to rename as requested. Why
> can't the file manager just do it, meaning in two steps ?
>
> First step - renaming as requested but with a leading char (maybe _)
> then second step, renaming without that char.
>
> It could of course be an option. If someone really needs speed and no
> conflict is possible, then that would be useful. But seriously i
> can't think of such a  case ... where do we talk about such large
> amounts that even manual renaming with a graphical file manager needs
> to speed up ... ?? (Normally, scripts are doing this kind of stuff,
> and in batch.) Therefore, i would say the default could be safe
> rename (two steps) and any checkbox would be for 'unsafe one-step
> renaming'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]