Re: File import, sort names numerically not working.
Posted by Norbert Vischer on
URL: http://imagej.273.s1.nabble.com/File-import-sort-names-numerically-not-working-tp3682440p3682445.html
The option "Sort Numerically" only picks the digits of the file name and concatenates them to a number. Then these numbers are sorted.
This behaviour has frequently created confusion also in our lab.
If you have this file list:
1a9.tif
1a10.tif
2a9.tif
the extracted and sorted numbers are 19, 29, 110 and result in:
1a9.tif
2a9.tif
1a10.tif
Wayne, my suggestion is that the filename would be split into an alphanumerical prefix and a purely numerical suffix. Then, prefixes should be sorted alphabetically, and only where they are equal ("1a" in the example), suffixes should sorted numerically.
The above sequence would then be sorted like this:
1a9.tif
1a10.tif
2a9.tif
Norbert Vischer
Research engineer
Centre for Advanced Microscopy
Swammerdam Institute for Life Sciences (SILS)
Science Park 904
1098 XH Amsterdam, the Netherlands