Get first/last filename to create a folder and move files

Hello again,

I want to get the first and last file name of an selection (all with the same extension), create an folder like FILENAME_FIRST-FILENAME_LAST (file names without extension) and move the selected files into that new folder. Any hints? I assume I must write a script and pass the filenames via DOpusRT /info listsel to my script?

Many thanks and greetings
opusfreak

The names are included in the file names? If so, please show a few examples. Probably no scripting required.

Hello MrC,

thanks for your answer! An example as requested:
PIC1000.jpg
PIC1001.jpg
PIC1002.jpg
PIC1003.jpg
PIC1004.jpg

Selected from PIC1001.jpg to PIC1003.jpg
New folder:
PIC1001-PIC1003

Many thanks and greetings
opusfreak

I misunderstood the original request. A script is required. All the arguments have to be passed to create the range.

I'll create you a ActivePerl script if you want.

Hello again MrC,

really many thanks for your offer with the ActivePerl script. I will write an AutoHotKey script asap. I just started to work with AutoHotkey and have already some working scripts. So that new script will be a good exercise.

Greetings
Udo