[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

re: [MacPerl] ordering of files in Drag-n-drop from Finder



schabel@leland.stanford.edu (Matthias Schabel) writes:
} Does anyone know how the Finder orders selected files; for example, imagine
} I have a bunch of files with names
} 
} f.1
} f.2
} ...
} f.10
} 
} and I select them in a particular order, say,
} 
} f.2
} f.3
} f.6
} f.4
} ...
} f.1
} 
} and drag-n-drop them onto a perl script.  When I do this, I find that the
} filenames are sorted before being processed by the script; is it the perl
} interpreter doing this or does the Finder sort the list first?  In either
} case, is there any way to preserve the order in which the files are
} selected?

The Finder, based on my experience.  They seem to be sorted the same
way they would appear in the Finder.  If you have them sorted by name,
they're alphabetical, by date, and they're by date, etc.  If you want
them sorted in some way the Finder understands, you can just choose
what you want in the Finder's View menu.  Otherwise, I believe you're
out of luck although maybe there's a sneaky way to do things with drag
and drop aware apps like Find File.  Of course, you can always have
MacPerl sort @ARGV any way you'd like once it gets it.

} 
} Thanks,
} 
} M
} 
} ------------------------------------------------------------------------
} Matthias Schabel (office 220 McCullough Bldg.)
} http://www-leland.stanford.edu/~schabel/Matti/
} 
} lab:    (415) 723-3209 (Swagelok central)
} office: (415) 725-0427 (Phone me for hot, hot, hot physics action)
} FAX:    (415) 725-5457 (FAX me, baby)
} SSRL:   (415) 926-5253 (Grad student irradiation facility)
} home:   (415) 328-9342 (I've got a new home, hooray for me!)
} 
} "Sweat is 10% inspiration and 90% perspiration."
} 
} -MCS
} -----------------------------------------------------------------------
} 
} 
} 
---
--------
Paul J. Schinder
NASA Goddard Space Flight Center,
Code 693, Greenbelt, MD 20771 USA
schinder@pjstoaster.pg.md.us