Selection after Shift+F5
Moderators: Hacker, petermad, Stefan2, white
Selection after Shift+F5
Hello.
Is it possible to make an option to change the selection on a newly created file using Shift+F5 copy option (on that dialog, or at least as a "hidden" .ini setting)?
Now it creates new file, but the selection stays on the old file and in the directory with hundreds of files (if the new file is not "close" to the original one) it takes some time to find the newly created file.
PS: If there is that (or similar) option already and I just didn't find it yet, please tell me, where it is.
Thank you.
Is it possible to make an option to change the selection on a newly created file using Shift+F5 copy option (on that dialog, or at least as a "hidden" .ini setting)?
Now it creates new file, but the selection stays on the old file and in the directory with hundreds of files (if the new file is not "close" to the original one) it takes some time to find the newly created file.
PS: If there is that (or similar) option already and I just didn't find it yet, please tell me, where it is.
Thank you.
Re: Selection after Shift+F5
Code: Select all
TOTALCMD#BAR#DATA
cm_Edit
/CGL0T="%P" /N="%O_copy.%E"
wcmicon2.dll,62
Create a copy of the file under the cursor and move the cursor to it
Last edited by Fla$her on 2024-08-15, 15:20 UTC, edited 2 times in total.
Overquoting is evil! 👎
Re: Selection after Shift+F5
Hello and welcome.
For that alone, you can quickly sort by date, and select the new file (and then sort by name again, if you want)
There are even keyboard shortcuts for that.
JFreeman wrote: 2024-08-15, 12:21 UTC ...
Now it creates new file, but the selection stays on the old file
and in the directory with hundreds of files (if the new file is not "close" to the original one)
it takes some time to find the newly created file.
...
For that alone, you can quickly sort by date, and select the new file (and then sort by name again, if you want)
There are even keyboard shortcuts for that.
Re: Selection after Shift+F5
Thank you both for your suggestions.
But unfortunately, they are not very useful in my case:
1. Button (at least I think it's a definition of a button from Fla$her) - I don't use mouse very often when working in TC, and also I'm too used to Shift+F5. Maybe I might try to create a button and assign the key shortcut Shift+F5 for it - if it's possible, but definitely not like this one, which uses cm_Edit and predefined name of a new file ("my" files are mostly binary files, sometimes xml).
2. Using a sort - new file is created with the same attributes as old one (also timestamp) - and I work sometimes with hundreds of files generated by some system, when they all have the same attributes (creation timestamps as well), so sorting by date doesn't do anything (I know about shortcuts for sorting by name/ext/date/size - Ctrl+F3-F6) and I use them often, because it's the most useful workaround I've found so far - sort by name and try to find it quickly "by looking".
But unfortunately, they are not very useful in my case:
1. Button (at least I think it's a definition of a button from Fla$her) - I don't use mouse very often when working in TC, and also I'm too used to Shift+F5. Maybe I might try to create a button and assign the key shortcut Shift+F5 for it - if it's possible, but definitely not like this one, which uses cm_Edit and predefined name of a new file ("my" files are mostly binary files, sometimes xml).
2. Using a sort - new file is created with the same attributes as old one (also timestamp) - and I work sometimes with hundreds of files generated by some system, when they all have the same attributes (creation timestamps as well), so sorting by date doesn't do anything (I know about shortcuts for sorting by name/ext/date/size - Ctrl+F3-F6) and I use them often, because it's the most useful workaround I've found so far - sort by name and try to find it quickly "by looking".

Re: Selection after Shift+F5
This can be done directly on the Misc. page (cm_Confirmation) without opening additional dialogs.
Fixed to take the name with the addition "_copy".JFreeman wrote: 2024-08-15, 15:02 UTC and predefined name of a new file ("my" files are mostly binary files, sometimes xml).
Although there is one problem here.
Overquoting is evil! 👎
Re: Selection after Shift+F5
Our systems (thank god, or they creators) don't use spaces in path, so this solution is for now the best possible.
I've created in Miscelaneous page of Settings new shortcut Ctrl+Alt+F5 (other key combinations used by default operations I use sometimes) and assigned it your proposed command and parameters.Fla$her wrote: 2024-08-15, 15:21 UTCThis can be done directly on the Misc. page (cm_Confirmation) without opening additional dialogs.
Code: Select all
cm_Edit
/CGL0T="%P" /N="%O_copy.%E"
Thank you again.
PS: after some "playing" with parameters for commands in TC, now I think that adding a parameter for cm_CopySamePanel for selecting newly created file would be very useful.
Re: Selection after Shift+F5
Add this entry to usercmd.ini:
Code: Select all
[em_CopyFile]
cmd=cm_Edit
param=/CGL0T="%P" /N="%O_copy.%E"
Overquoting is evil! 👎
Re: Selection after Shift+F5
The behavior was changed in TC 11.03.
Ghisler has promised to revert it to the previous behavior (where the new file was selected) and make it optional See: https://www.ghisler.ch/board/viewtopic.php?p=453685#p453685
Ghisler has promised to revert it to the previous behavior (where the new file was selected) and make it optional See: https://www.ghisler.ch/board/viewtopic.php?p=453685#p453685
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Selection after Shift+F5
2Fla$her
The T parameter is risky to use here.
The T parameter is risky to use here.
T: Instead of creating an empty file, copy a template file to the new name. By default, the user's template directory will be used. The first file in it with the same extension will be copied to the new file.
Re: Selection after Shift+F5
Wow, that's great news.petermad wrote: 2024-08-16, 09:57 UTC Ghisler has promised to revert it to the previous behavior (where the new file was selected) and make it optional See: https://www.ghisler.ch/board/viewtopic.php?p=453685#p453685
I wasn't sure, if it worked that way before (I've been using MAC for a while), but I definitely don't like the current behavior, so the option to turn it "my" way is highly appreciated.
Re: Selection after Shift+F5
You are right - I tried it now and really - it created new file with a name derived from the filename under cursor, but the content was completly different (as you said, probably from the first file of this type in a directory).sa16 wrote: 2024-08-16, 10:41 UTC 2Fla$her
The T parameter is risky to use here.T: Instead of creating an empty file, copy a template file to the new name. By default, the user's template directory will be used. The first file in it with the same extension will be copied to the new file.
So I'll wait (a little, I hope) for the correction of that Shift+F5 functionality by the Author.
Re: Selection after Shift+F5
Perhaps. I don't understand at all why the author attached the logic with the first file here. What was the task?
Overquoting is evil! 👎
Re: Selection after Shift+F5
2JFreeman
You can try this:
Then you can edit the file name in the TC-prompt - it is almost like using Shift+F5 - you just have to preserve T= and the quotation marks.
You can try this:
Code: Select all
[em_CopyFile]
cm_Copy /G
?%QT="%P%N"
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Selection after Shift+F5
Somewhat related: What is the word on street re a update/new version of TC, alpha/beta time soon? The unexpected "moving" still catches me by surprise.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: Selection after Shift+F5
Button with the TCFS2 (the optional TCFS2Tools module functions are not used):
Code: Select all
TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Utils\TCFS2\TCFS2.exe
/ef "if(null("%N"), tem(`cm_List Select file or folder!`), if(null(%E), set_ini(`%%COMMANDER_PATH%%\usercmd.ini`,em_temp,cmd,`""%%COMMANDER_EXE%%" /P /O /S /L="%P%O (2)""`), set_ini(`%%COMMANDER_PATH%%\usercmd.ini`,em_temp,cmd,`""%%COMMANDER_EXE%%" /P /O /S /L="%P%O (2).%E""`))+tem(`cm_ClearAll,cm_Copy /GBOT="%P%O (2).%E",cm_Wait 500,em_temp,cm_Wait 500,cm_RenameSingleFile`))"
wcmicons.dll,62
Copy file/folder under cursor to "name (2).ext", go to "name (2).ext" and rename it