Report Files of a Given Length.

Discuss and share scripts and script files...
Post Reply
SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Report Files of a Given Length.

Post by SkyFrontier »

Code: Select all

   input $v, "Please enter the length of files to be searched (default value is max. allowed by NTFS):", "255";
   #263; //all items on a branch
   sortby("len", "d");
   focus;
   selfilter "$v", , "len";
//   selfilter "> 255", , "len";
   focus; //Without this only one focused item is returned
   $l= get("SelectedItemsNames", "<crlf>");//Get names of Selected items
   #1048; //focus first selected
   echo "Items with lenght $v:<crlf>$l";
   copytext $l;
   status "List ready on clipboard, too!";
-any ideas on how to get the "selfilter "> 255", , "len";" effect?
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

admin
Site Admin
Posts: 66256
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Report Files of a Given Length.

Post by admin »

#263; ? Why not simply search by length?

Code: Select all

?len: > 260

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Report Files of a Given Length.

Post by SkyFrontier »

admin wrote:#263; ? Why not simply search by length?

Code: Select all

   input $v, "Plz enter the min. length of files to be searched (default value is max. allowed by NTFS):", "255";
   $p = <curpath>;
   copytext "$p?len: > $v";
   focus a;
   sendkeys "^{v}";
   sendkeys"{enter}";
   focus;
   #250;
   $l= get("SelectedItemsNames", "<crlf>");
//   #1048; //focus first selected
   echo "Items with lenght greater than $v:<crlf>$l";
   copytext $l;
   status "List ready on clipboard, too!";

/*
//FINAL - one liner:
   input $v, "Plz enter the min. length of files to be searched (default value is max. allowed by NTFS):", "255"; $p = <curpath>; copytext "$p?len: > $v"; focus a; sendkeys "^{v}"; sendkeys"{enter}"; focus; #250; $l= get("SelectedItemsNames", "<crlf>"); echo "Items with lenght greater than $v:<crlf>$l"; copytext $l; status "List ready on clipboard, too!";

*/
GUI-driven = avoiding unnecessary typing.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

admin
Site Admin
Posts: 66256
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Report Files of a Given Length.

Post by admin »

:!: sendkeys is not supported officially. I could remove it at any time without warning. Please do not publish scripts using non-supported stuff.

Post Reply