Remember autorename data during copy

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
nemadeka
Junior Member
Junior Member
Posts: 82
Joined: 2009-04-26, 19:44 UTC

Remember autorename data during copy

Post by *nemadeka »

Apology:
a) I did not search the forum for this
b) My current version is 7.57

I often have to copy files, from a directory tree to a single folder, which have the same filename, like 'email.doc', for batch processing.

TC has this nice feature which allows me to autorename copied files. Very convenient.

However, when it comes to a hundred of such files, TC behaves like an old, forgetful lady:
email.doc exists!
trying to rename as email2.doc!
email2.doc exists!
trying to rename as email3.doc!
email3.doc exists!
trying to rename as email4.doc!

until it discovers that email125.doc has not been taken yet, and this repeats itself with the next email.doc. This slows TC dows a lot, you can check it.

I would keep the recently used autorenaming patterns/pairs in memory, or somehow else try to bypass this checking of all filenames in sequence every time.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I don't know how it was in your ancient version but in current TC versions there is an option to auto-rename on collision, it is available from More Options >> button in overwrite dialog.


How many files do you have? I've tried with 700+ files with sequential names and auto-renaming is still fast when I copy a file to that folder with auto-rename...
Last edited by MVV on 2016-12-15, 20:59 UTC, edited 2 times in total.
User avatar
Stefan2
Power Member
Power Member
Posts: 4159
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Remember autorename data during copy

Post by *Stefan2 »

Apology:
nemadeka wrote:b) My current version is 7.57

>>> Total Commander 9.00a final available






 
nemadeka
Junior Member
Junior Member
Posts: 82
Joined: 2009-04-26, 19:44 UTC

Post by *nemadeka »

Thanks for your understanding and feedback.

My TC version has an option to auto-rename on collision, I use it, as explained in my post.

I don't want to upgrade TC, the current versio suits me fine.

No matter if it is "fast" or not, on a particular system, the mechanics is still illogical, clumsy, that's all I wanted to say.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Well, I think that name collision is rare enough to make this algorithm sufficiently efficient...
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6509
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

nemadeka wrote:Thanks for your understanding and feedback.

My TC version has an option to auto-rename on collision, I use it, as explained in my post.

I don't want to upgrade TC, the current versio suits me fine.

No matter if it is "fast" or not, on a particular system, the mechanics is still illogical, clumsy, that's all I wanted to say.
Commenting outdated software which you use for no real reason
is almost useless because most other users don't have your version since 2012.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1375a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
User avatar
Hacker
Moderator
Moderator
Posts: 13073
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Let me also join in to comment on how I dislike how stuff worked 20 years ago. :roll:

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.
User avatar
petermad
Power Member
Power Member
Posts: 14829
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2nemadeka
I don't want to upgrade TC, the current versio suits me fine.
Hmm, apparantly not! ;-)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
nemadeka
Junior Member
Junior Member
Posts: 82
Joined: 2009-04-26, 19:44 UTC

Post by *nemadeka »

Happy New Year to everyone.

Folks, generally this thread is my message to the developer, where you could contribute by replicating my *real-life* situation on your setup and providing tips.

The developer could read the code and figure it out whether my suggestion is easy to implement and/or worth implementing, or have already been implemented.

You don't need to be a rocket scientist to understand that my suggestion is clear, reasonable and makes TC a bit faster and more rational, this is what most people like in TC.

I've not expected to find meaningless flame posts here. Please, hold your horses next time.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Well, it is hard to optimize everything so usually people optimize bottlenecks. Sorry but I doubt that this place is a bottleneck because it requires a very specific scenario.

And, even if Christian will implement something that you ask, this feature won't be available in TC 7.57...

Regarding your task, I believe that it should be done in other way, e.g. you can make a button that will simply copy focused file (or even selected files) to that dir and append timestamp or a random number to its name to make it unique, and it will be done instantly and with no questions from TC.
E.g. you can use a button with such BAT file (button parameters are "%T" %WL):

Code: Select all

@echo off
if -%1==- echo Parameters: "%%T" %%WL & pause & goto :EOF
set "ARG_0=%~dpnx0"
set "ARG_1=%~dpnx1"
set "ARG_2=%~dpnx2"
powershell.exe -NoProfile "iex (([IO.File]::ReadAllText($Env:ARG_0)) -replace '^(.*\n)*?.*<::::>.*\n', '')" & goto :EOF


$targetPath = $Env:ARG_1;
$fileListPath = $Env:ARG_2;
$stamp = [DateTime]::Now.ToString('yyMMdd-HHmmss,fff');
$index = 0;
foreach ($file in @(gc $fileListPath)) {
	$file = gi $file;
	cp $file "$targetPath\$($file.BaseName) ($stamp-$(0 + $index++))$($file.Extension)";
}
nemadeka
Junior Member
Junior Member
Posts: 82
Joined: 2009-04-26, 19:44 UTC

Post by *nemadeka »

2MVV
Thanks for your tip, looks like the optimal solution for me.

--
I downloaded TC 9.0a and tried it on a desktop PC with some 3GHz Celeron and Win7, Windows performance rating is about 6.0 (this is not really important though).

I created a folder tree containing 7810 files named codes.txt, file size - 402 bytes.

When I copied this folder tree to another forlder on the same partition, the copying took 25 seconds.

Then, I performed a search in the same folder, then selected all files in the listbox and copied them into the same empty target folder with the option "autorename copied". After 18 minutes TC copied 53% of the files, and the process kept slowing down all the time, so I cancelled it.

So, the opinions about the age of my workhorse PC or the TC version are groundless, it is the mechanics, the "forgetfulness" of the "autorename copied" option that causes gradual slowdown. (I hope that we all agree that 25 seconds and 18 minutes *are* a bit different).

I do not insist on anything. That was free advice and user testing.

Thank you for your kind attention.

UPD: On my 10-year-old WinXP laptop WinRar unpacks the folder tree into a single folder, with autorename within 7 minutes, I don't know, why.
Post Reply