I want to sort array of files, how can I do that?
see this answer
alternative: @Mamata_Shee
assign this to your array variable
arrayVariable.AsEnumerable.orderBy(function(x) x).toarray
or
arrayVariable.AsEnumerable.orderBydescending(function(x) x).toarray
to sort descending
Arr_Files.Orderby(Function(F) New FileInfo(F).CreationTime).Toarray
@Mamata_Shee
we would suggest to be more specific within your request / sort definition.
From your screenshot we do see that you are working with find files and folders. On what property you want to order the array (name, creation date…?)
@jack.chan
For more clarification,
I’m fetching the files inside a drive folder using Find files and folders activity, so basicallly the output Files12 is the list of objects(files), now I want to sort those fetched files present inside Files12 array.
Thanks
not knowing all details e.g. the search expression.
the returned array is of datatype: Google File
give a try at:
arrFilesOrdered = yourOriginArray.OrderBy(Function (x) x.name).toArray
then replace x with x.name since its a file array
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.