I have a folder of about 1,000 image files. I need to create a list of them. I saw somewhere that if I go into Terminal and cd into the folder, all I have to do is type in
ls > list.csv
to generate a list. The thing is, this list is not in the same order as the files I see in Finder. For example, in Finder, the first image is 16_left.jpg. However, the first image in the generated list.csv file is 10017_left.jpg, whilst 16_left.jpg is snuggled all the way down in between 15975_right.jpg and 16007_right.jpg.
I can see that in Finder, it sees the number 16 as being the smallest in the files and puts that top, whereas the list.csv file sorts the list not by the whole number itself but by each individual digit left-to-right.
How do I get list.csv to be in the same order as Finder?
print -rC1 -- *.jpg(NDn)
give you the order you want?)
?