How to select the first 1000 or 900 files?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
canyin
Junior Member
Junior Member
Posts: 4
Joined: 2016-03-30, 06:20 UTC

How to select the first 1000 or 900 files?

Post by *canyin »

When you have files in a folder (ex. 5000), how to Select the first 1000 or 900 files, creating a button with this parameter on the button bar?
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

AutoHotkey: Select a amount of Files down.

Post by *Stefan2 »

Take a look here: http://ghisler.ch/board/viewtopic.php?p=298324#298324


Based on Romans script:

Select-Amount-Of-Files-small.AHK

Code: Select all


;   http://ghisler.ch/board/viewtopic.php?p=298324#298324	
;   Hacker Posted: Wed Jul 29, 2015 21:32    Post subject: 	
;   Here is a shorter AHK script:

; First select first wanted file manually by hand yourself.
; Next execute this script to select %OutputVar% times down.

WinActivate, ahk_class TTOTAL_CMD
WinWaitActive, ahk_class TTOTAL_CMD

; cm_GoToFirstFile=2050;Place cursor on first file in list
; PostMessage, 1075, 2050

msg  = Purpose: Select a bunch of items`n
msg = %msg%1) Select first item(s) yourself.`n
msg = %msg%2) Run this script.`n
msg = %msg%3) Enter below an amount of how many to select down.
InputBox, OutputVar, TC AHK script, %msg%

SendInput, {Insert %OutputVar%}	

AHK v1.1.22.9

For more info about AHK and that script, see here
http://ghisler.ch/board/viewtopic.php?p=298324#298324





For "How to create an button" see:
http://ghisler.ch/board/viewtopic.php?p=287965#287965

Code: Select all

CMD: "%COMMANDER_PATH%\TOOLs\AHK\AutoHotkey.exe" "%COMMANDER_PATH%\TOOLs\AHK\Select-Amount-Of-Files-small.AHK"
PARAM:
ICON: "%COMMANDER_PATH%\TOOLs\AHK\AutoHotkey.exe"
Tooltip: Select-Amount-Of-Files-small




 
(Selektieren Auswählen Anzahl Dateien markieren)
canyin
Junior Member
Junior Member
Posts: 4
Joined: 2016-03-30, 06:20 UTC

Post by *canyin »

Thank you!
User avatar
Vochomurka
Power Member
Power Member
Posts: 816
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Single user license #329241
PowerPro scripts for Total Commander
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Batch file is also possible:
1. Enumerate files in folder and stop at desired set /A counter value, outputting every name to temporary file list.txt.
2. Copy list to clipboard: type list.txt | clip.
3. Pass cm_LoadSelectionFromClip command to TC with a tool like TCMC or TCFS2: TCFS2 /ef tcm(2033).
TW
Senior Member
Senior Member
Posts: 392
Joined: 2005-01-19, 13:35 UTC

Post by *TW »

thanks for the nice hints. :)
licenced and happy TC user since 1994 (#11xx)
Post Reply