command line - display folders SORTED by size

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
gonen52
Junior Member
Junior Member
Posts: 15
Joined: 2013-01-11, 14:24 UTC

command line - display folders SORTED by size

Post by *gonen52 »

Hi

Is there a way to start TC using bat file - that will display the given folders - sorted by SIZE ??

thank you !!
User avatar
nsp
Power Member
Power Member
Posts: 1954
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

To sort by size you have command 123 (cm_LeftBySize) and 223 (cm_RightBySize).
You can use in a batch nirsoft nircmd like this :

Code: Select all

:::: Launch TC and sort by size L / R ::::
totalcmd ..... <your parameters to open folder>
REM wait one second ...
nircmd wait 1000
nircmd win sendmsg  class TTOTAL_CMD 1075 0123 0
nircmd win sendmsg  class TTOTAL_CMD 1075 0223 0
Using the same method, you can use automation scripting language like PowerPro, AHK, AutoIT, WinBatch, VBScript, PowerShell,..... to send 1075/0123 message tyo TotalCmd window.
gonen52
Junior Member
Junior Member
Posts: 15
Joined: 2013-01-11, 14:24 UTC

Post by *gonen52 »

Sorry but I am not allowed to install any software in addition to TC....

thanks
User avatar
white
Power Member
Power Member
Posts: 6014
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: command line - display folders SORTED by size

Post by *white »

gonen52 wrote:Is there a way to start TC using bat file - that will display the given folders - sorted by SIZE ??
Perhaps you can redirect section left/right in wincmd.ini

Code: Select all

[left]
RedirectSection=c:\left.ini
and use in your bat file something like

Code: Select all

(echo [left]
echo path=d:\some folder\
echo ShowAllDetails=1
echo SpecialView=0
echo show=1
echo sortorder=3
echo negative Sortorder=1
)>c:\left.ini
gonen52
Junior Member
Junior Member
Posts: 15
Joined: 2013-01-11, 14:24 UTC

Post by *gonen52 »

Thanks
I will try it !!!
User avatar
nsp
Power Member
Power Member
Posts: 1954
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

gonen52 wrote:Sorry but I am not allowed to install any software in addition to TC.
You do not have to install any software, nircmd.exe is a portable application just copy the exe.

If you accept to have a additional step, you could define with TC 8.1 a button in TC that sort both L+R at same time.

Code: Select all

TOTALCMD#BAR#DATA
cm_LeftUnsorted,cm_RightUnsorted,cm_LeftBySize,cm_RightBySize

wciconex.dll,14


0
-1
The unsorted command allows you have right order if it is already sorted by size.

The idea of having Left /Right sections redirected is a very good idea, but need to be tested in all use cases !
gonen52
Junior Member
Junior Member
Posts: 15
Joined: 2013-01-11, 14:24 UTC

Post by *gonen52 »

thanks

I know its an exe but it is not allowed in here......

sorry...
Post Reply