custom manual sort order?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

custom manual sort order?

Post by *sgp »

Is it possible to sort files manually? I want to sort images in thumbnail view, then process them with photoshop following the sort order. TIA
User avatar
ado
Senior Member
Senior Member
Posts: 445
Joined: 2003-02-18, 13:22 UTC
Location: Slovakia, Pezinok

Post by *ado »

I am affraid only chance for manual sorting is to start renaming files adding number prefix of suffix and let TC sort by name...or change date and sort by date. Definitely something like drag and drop sorting TC doesn't support

ado
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

This is only possible by renaming them. For that you may use the Multi rename tool and add to the start of all names a number using the counter and using a step by 10 (or maybe 100).

This way you have only to change the numbers and can insert more than one picture between two other.

father.jpg
flower picture.jpg
girlfriend.jpg
mother.jpg
My Rolls Rolls.jpg
nice Picutre.jpg

is going to

10father.jpg
20flower picture.jpg
30girlfriend.jpg
40mother.jpg
50My Rolls Rolls.jpg
60nice Picutre.jpg

and could be sorted

05mother.jpg
10father.jpg
15girlfriend.jpg
50My Rolls Royce.jpg
60nice picture.jpg

and if I run out of gaps (between the numbers) I can replace the counter with new counters with gaps.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
petermad
Power Member
Power Member
Posts: 14826
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2sgp

If you are using the FAT32 (or FAT16) file system you can manually copy the files to an empty directory in the order you want them. Then press Ctrl+F7 and you will se the files in the order they were put there.

Note that editing the files might change the order, and so might renaming them. If you use Win 98 and delete a file it will leave a "space" where the next file that you copy to the directory will slip into. That doesn't happen under Win XP.

If you use the NTFS file system the files will always be sorted by name when seen in unsorted view.

You can see which filesystem you are using by rightclicking on a drive button and then choose "Properties"
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
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

petermad wrote:2sgp

If you are using the FAT32 (or FAT16) file system you can manually copy the files to an empty directory in the order you want them. Then press Ctrl+F7 and you will se the files in the order they were put there.
Good Idea.
You may combine it with the renaming with counter to keep the desired sort order.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
van Dusen
Power Member
Power Member
Posts: 684
Joined: 2004-09-16, 19:30 UTC
Location: Sinzig (Rhein), Germany

Post by *van Dusen »

To apply a manual sort order, you could use the Global_DIZ plugin in conjunction with a DOS batch:

"Installation":

1. Add a line to your <global_diz.ini>:

Code: Select all

[UserColumns]
Column1=ShortDiz.diz
Column2=ManSort.diz
2. Add a custom column to any custom column view:

Code: Select all

Sort | 20 | -> | [=global_diz.ManSort]
3. Save this DOS batchfile as <ManSort.bat> in your TC-tools directory:

Code: Select all

@Echo OFF
Set ROWCOUNT=0
For /F %%R IN (C:\Programme\TotalCmd\PlugIns\GlobalDIZ\ManSort.diz) DO Set /A ROWCOUNT=ROWCOUNT+1
Set /A ROWCOUNT=ROWCOUNT+1
Echo %1=%ROWCOUNT% >>C:\Programme\TotalCmd\PlugIns\GlobalDIZ\ManSort.diz
(You have to customize the pathnames probably)

4. Add a button, which calls the <ManSort.bat>, to your TC buttonbar:

Code: Select all

Command: c:\programme\totalcmd\tools\ManSort.bat
Parameters: %p%n
(use lower case letters for parameters, short names are needed!)
(You have to customize the pathname probably)


Usage:

Click the file, you'd like to sort topmost and call <ManSort.bat> by pressing the button you've created in step 4
Click the file, you'd like to see at 2nd position and press the button...
...and so on

Sometimes you need to refresh the TC panel to see the ordinal numbers in your "Sort" column. Now you can sort the filelist with a simple click to the column header.
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

2 all: thanks for the good ideas.

2 van Dusen: I didn't know about global.diz - nice - thanks for your complete example. global.diz seems to be the closest solution to an attribute "cache" which is needed to store the sorting information. but the user interface is lacking - I mean if I move/delete a file I speculate that ManSort.diz doesn't get updated because its columns are "outside" TC. Am I correct?
So maybe another approach is to use file descrip.ion's:
1) rename descript.ion to descript.bak
2) use ctrl-z (or van Dusen's batch file) to add sort order to new descript.ion
3) when done with all files, rename descript.ion to ManSort.diz and descript.bak to descripti.ion
4) use global.diz on ManSort.diz as van Dusen described.

Would the descript.ion file format be compatible with global.diz?

The advantage of descript.ion files is that TC knows about them, so their contents get updated in move/copy/delete operations.
User avatar
bela_bacsi
Junior Member
Junior Member
Posts: 20
Joined: 2016-06-10, 03:14 UTC
Location: Hungary

Re: custom manual sort order?

Post by *bela_bacsi »

In case of sorting images Irfanview is a good helper: local menu of the folder >> "Browse with Irfanview" >> rearrange them manually >> select all >>"Batch rename..." them using ### counter placeholder.
Post Reply