Friday, January 3, 2014

Sorting files according to their sizes and displaying the sorted values along with their names

q: (it, items 1 of items 1 of (it,(size of it, name of it) of (files of folder "d:/new folder")) whose (item 0 of it = item 0 of item 1 of it)) of elements of set of items 0 of  (size of it, name of it) of (files of folder "d:/new folder")

A: 0, abc.txt
A: 8, p.txt
A: 16, aaa.txt
A: 72, url debugger.txt
A: 99, url.txt
A: 163, x.txt
A: 251, k.txt
A: 251, n.txt
A: 1269, qna.exe - Shortcut.lnk
A: 1401, RelevanceDebugger.exe - Shortcut.lnk
A: 3030, relevancequr.qna
A: 3241, qqqq.txt
A: 3348, Restart Moex Branches Servers.bes
A: 4778, excel.txt
A: 13555, explanation of sum of plurals of tuple querry.docx
A: 14103, Training Campus Template.xlsx
A: 17382, Tivoli Endpoint Manager - BigFix Actions.htm
A: 33792, Dynamic downloads add the ability to use relevance clauses to specify downloads.doc
A: 42320, TEM vs SCCM TCO Analysis v7 20110505.xlsx
A: 43520, Training Campus Template.xls
A: 48640, actionscript.doc
A: 75776, 0771.doc
A: 119582, Registry Objects.htm
A: 204107, Relevance Queries.pdf
A: 441856, EXCEL2007.doc
A: 465550, In the park with god..pptx
A: 479956, actionscript.pdf
A: 720337, relevanceBuilder.zip
A: 727552, MS_Excel_-_Intermediate_Level.1.ppt
A: 864768, PracticalRelevanceGuide.ppt
A: 2497536, EXCEL_Formula(design).xls
A: 4518319, UC_Excel_2007_Module_1_-_Essentials.pdf
A: 8750053, 45778.mp4
A: 11083896, msexcel.pdf
A: 257780548, 19177.mp4
T: 253.721 ms


EXPLANATION

* 'elements of set of items 0 of  (size of it, name of it) of (files of folder "d:/new folder")' gives the sorted values of sizes of 'files of folder 'new folder''

*'(it, items 1 of items 1 of (it,(size of it, name of it) of (files of folder "d:/new folder"))whose (item 0 of it = item 0 of item 1 of it))'

-In this the first & the second 'it' refers to the sorted values of files of 'new folder'.

-'items 1 of items 1 of (it,(size of it, name of it) of (files of folder "d:/new folder"))', refers to the names of files of 'new folder'

-if we consider the whole statement, i.e, '(it, items 1 of items 1 of (it,(size of it, name of it) of (files of folder "d:/new folder"))whose (item 0 of it = item 0 of item 1 of it))', a whose statement  is added at the end in which the 'item 0 of it' is referring to the second 'it' of the statement, which in turn refers to the sorted values of sizes of files of 'new folder', and 'item 0 of item 1 of it' is referring to the unsorted values of files of folder 'new folder'.
on the whole the sizes are bieng compared and the names of those files are displayed, whose sizes matches the sorted order of sizes of files of 'new folder' along with their sizes.



No comments:

Post a Comment