I want to sort array of files, how can I do that?
see this answer
assign this to your array variable
to sort descending
I’m trying to do this, but getting error as shown below:
please try this instead
Arr_Files.Orderby(Function(F) New FileInfo(F).CreationTime).Toarray
It showing me error:
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…?)
I want to sort the files by their name.
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.
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
@ppr Finally, it’s working.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.