Renaming issue in Find Files Listbox

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
SPL
Junior Member
Junior Member
Posts: 9
Joined: 2003-02-19, 13:04 UTC
Location: South Africa

Renaming issue in Find Files Listbox

Post by *SPL »

Hi,

Congrats on getting the new forum running.

The issue is as follows:

1) Perform a seach on a directory (Alt-F7) and feed the results to a listbox.
2) Rename any file in the Search result listbox (Shift-F6)

The new filename is not reflected in the Search result list, however the filename has been changed. This can be verified by examining the directory containing the file.

Is it possible to fix this?

Steve
User avatar
Hacker
Moderator
Moderator
Posts: 13065
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Hi,
It's like that because after a renaming operation TC wouldn't know if the renamed file belongs to the search result (eg search for *.txt, you rename one file to *.bak). TC would have to repeat the search after every rename.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
huub
Junior Member
Junior Member
Posts: 14
Joined: 2003-02-18, 21:34 UTC

Post by *huub »

why don't you use Ctrl-T to rename files
hf
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

huub wrote:why don't you use Ctrl-T to rename files
It doesn’t matter which renaming method you follow but the problem relies on a list feed from a search result. I haven’t tried it but I bet you’ll get the same outcome if you use Ctrl+T. TC treats feed lists differently than the normal ones!
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hacker's explanation is correct, I'm not updating the list because I would have to repeat the search, or check all file names whether there was a change or not.

While it would be feasible to check this for a single file rename, it's not for multi-rename or normal rename of multiple files - the actual rename is done in a separate function from the file list. In normal operation, TC just re-reads the whole directory. But with a search for maybe several thousand files, this would be too slow.
Author of Total Commander
https://www.ghisler.com
huub
Junior Member
Junior Member
Posts: 14
Joined: 2003-02-18, 21:34 UTC

Post by *huub »

i just tried it on the feed list, it works on selected files (in the list!)

Well Christian, if you followed my contibutions this evening, why not enhance this Ctrl-T Dialog to somethin else than Rename?
hf
User avatar
SPL
Junior Member
Junior Member
Posts: 9
Joined: 2003-02-19, 13:04 UTC
Location: South Africa

Thanks for the Answers

Post by *SPL »

Steve
User avatar
SPL
Junior Member
Junior Member
Posts: 9
Joined: 2003-02-19, 13:04 UTC
Location: South Africa

Some more thoughts

Post by *SPL »

I'm not updating the list because I would have to repeat the search, or check all file names whether there was a change or not.
Ok, I think I understand. This is difficult to do because when renaming files during normal operation you automatically re-read the entire directory in order to display the new names.

However, you must already have coded structures to store an arbitrary list of files as you do when displaying files in archives etc.

Is it not possible to modify one of these structures to store a list of renamed files. Both the single file rename and multi-file rename tool would have to add to this list during a rename operation.

Then whenever file renaming occurs you would be able to display filenames by using the list of renamed files (without having to re-read the entire directory).

Of course, this would mean a more complicated file listing routine which is both able to list files in a directory or reconcile a directory list and renamed list.

I guess it is a lot of work all round. Still it would be nice to have correspondence between the file list and what is on the hard drive.

Steve
Post Reply