sort directories WITH files

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
nn1k3
Member
Member
Posts: 141
Joined: 2007-02-06, 16:59 UTC

sort directories WITH files

Post by *nn1k3 »

We know that directories are normally listed BEFORE files. All the directories "<DIR>" are bunched together at the top of the panel. QUESTION: Is there an option to sort directories WITH files?

That would be useful when I want to delete or move old web pages that I had saved as html. The saved item has two parts "foo.html" and "foo_files/". Seeing them displayed together would remind me to manage both items.

The sorted order would be: foo_files\; foo.html; goof\
rather than the normal: foo_files\; goof\; foo.html

This may not be worth implementing. One workaround is to type control-s and then "foo"
hi5
Power Member
Power Member
Posts: 637
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: sort directories WITH files

Post by *hi5 »

nn1k3 wrote: 2025-02-07, 19:17 UTCThat would be useful when I want to delete or move old web pages that I had saved as html. The saved item has two parts "foo.html" and "foo_files/".
Just delete foo.html and foo_files should automatically be deleted as well (so no need to select both file & folder in this case).
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)
User avatar
Gral
Power Member
Power Member
Posts: 1600
Joined: 2005-01-26, 15:12 UTC

Re: sort directories WITH files

Post by *Gral »

hi5 wrote: 2025-02-07, 20:22 UTC Just delete foo.html and foo_files should automatically be deleted as well (so no need to select both file & folder in this case).
This works this way only if the explorer delete method is enabled!
hi5
Power Member
Power Member
Posts: 637
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: sort directories WITH files

Post by *hi5 »

Perhaps so, but it is not set/checked in my setup here (I haven't set explorer delete) and still works.
I'm assuming this is a Windows thing as I think it has always worked that way?
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)
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: sort directories WITH files

Post by *petermad »

Perhaps so, but it is not set/checked in my setup here (I haven't set explorer delete) and still works.
It also works if you delete to recycle bin - because Windows then does the moving of the files to recycle bin.
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
hi5
Power Member
Power Member
Posts: 637
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: sort directories WITH files

Post by *hi5 »

Learned something :)
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)
User avatar
nn1k3
Member
Member
Posts: 141
Joined: 2007-02-06, 16:59 UTC

SHIFT delete can easiily remove HTML _files

Post by *nn1k3 »

Thank you to hi5, gral, and petermad. I'm all set now, but let me give back by summarizing for others:

Suppose you want foo_files/ to be deleted when you manually delete foo.htm.

When you press F8 (or DEL) you will see a dialog warning box. If the box is plain, cancel and try again by pressing shift-F8. You should now see a colorful box with a colorful file icon. When you press "yes" the foo_files\ folder will also be deleted.

OPTIONAL BACKGROUND:

There are two checkboxes in Configuration Options that relate to whether foo_files/ will be automatically deleted:
General Copy+Delete Options
#3. Use Explorer delete method (faster, cannot handle comments)
#4. F8/Del deletes to recycle bin (Shift=directly)
(FYI, I prefer to leave then unchecked.)

With neither #3 or #4 checked you will see these dialogs:
F8=> "Do you really want to delete the selected file foo.htm?" In a plain text box.
Shift F8=>"Are you sure you want to move this file to the Recycle Bin?" In a box with a colorful icon.

With only #4 checked:
F8=> "Are you sure you want to move this file to the Recycle Bin?" In box with a colorful icon.
Shift F8=> "Do you really want to delete the selected file foo.htm?" In a plain text box.

With item #3 checked (regardless of whether "4 is unchecked or gray-checked):
F8=>"Are you sure you want to move this file to the Recycle Bin?" In a box with a colorful icon.
Shift F8-> "Are you sure you want to permanently delete this file?" In a box with a colorful icon and red X.

Conclusion: Whenver you see the box with a coloful icon, the pesky foo_files\ will be deleted.

That solves my particular problem, so my question is moot. I have no need to sort files with folders.
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: sort directories WITH files

Post by *petermad »

Conclusion: Whenver you see the box with a coloful icon, the pesky foo_files\ will be deleted.
Correct - the "colorful icon" indicates that it is a Windows dialog and not a TC box, hence Windows is handling the deletion.

Notice that both the Windows delete confirmation dialog and Windows deleting to Recycle bin can also be configured per drive:
In TC's Menu click "Commands" -> "Open Desktop Folder" (or run cm_OpenDesktop) - right-click on "Recycle Bin" (or the equivalent in your language) and choose "Properties" - In the Windows dialog that pops up you can configure these settings.
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
oko
Senior Member
Senior Member
Posts: 250
Joined: 2007-05-03, 16:22 UTC

Re: sort directories WITH files

Post by *oko »

If you check the the option "show warning when delete to recycle bin" in recycle bin properties you will always get Windows deletion dialog boxes (colorful). If you uncheck the option you will always get TC deletion dialog boxes (plain) and in such case when there is a file deleted to recycle bin, the file and bounded folder will be deleted as well, but if there is a file deleted directly, only the file will be deleted.

Conclusion:
Regardless of settings in TC preferences or Windows recycle bin properties:
To recycle bin: Whenever a file is deleted to recycle bin, the file and bounded folder is deleted as well.
Direct deletion: Whenever you see the box with a colorful icon (Windows dialog box), the file and bounded folder is deleted as well. Otherwise (plain box - TC dialog box) only the file is deleted.
Post Reply