Which file is the first file, and how do you know that?
Maybe you can show us examples of the files and the properties you use to determine which file is the first?
sort is the correct approach to bringing an order to a list of items (like files). Your current code sorts the files by modification time (see -X). Maybe you want to sort by another criteria.
In reply to Re: how to run a specific file from a list of filenames in a folder
by Corion
in thread how to run a specific file from a list of filenames in a folder
by alenaustin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |