What is the order of getting files in directory.getfiles (path) state?

I’m currently using directory.getfiles to rotate files, but I need to find out what the order of getting files is when the argument is only path.

I try to find it by specifying the order of the files, but I can’t find any information of the default order.

What is the order of the files when the path is only specified as directory.getfiles(path) as shown above?

Thank you for reading

Hi,

The following document says

The order of the returned file names is not guaranteed; use the Sort method if a specific sort order is required.

So, we need to think it as no rule and need to sort if necessary.

Regards,

1 Like

This is the information I wanted to find.
Thank you very much.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.