I'm writing a rough .cmd batch to do an operation with a few files (4 or 5) in Windows. I want to mark the desired files in Explorer's checkboxes, and drag-and-drop them to the batch file, that will perform the operation (actually I'll put a shortcut in SendTo folder).
I need to control the order of the parameters (checked files), i.e., which checked file will be %1, which will be %2, and so on. It would be perfect if the order of parameters was the same order in which each file was checked; at least, if the files were in alphabetical order, I could, first of all, rename the files adding a number to them; the batch will send the filenames to an intermediary file, which will be sorted to another file, and the sorted file (in the desired order, achieved by numbering) will be used as source for the last operation.
But I wonder if could it exist anoter option that wouldn't need this intermediary file.
I made a few tests and I found no predictable order, neither alphabetical, nor related to the order in which the the boxes were checked. I suspect that the sequence of the command line parameters sent to the batch is the same order of their directory entries - but since Win10's CMD.COM doesn't execute "dir /ou", I wasn't able to verify this.
** TL;DR:I'm using Windows Explorer to select files that will be passed as parameters to a batch file, and I want to define, or at least preview, which of them will be %1, which will be %2, and so on. **