Rename fails if no files selected

I noticed a function will fail/stop if a Rename (or Copy) command is executed with no files selected.

This functions only works without line 4 or at least one file in d:\foobartemp. What do I need to change to make it work with line 4?

CreateFolder d:\foobartemp GO d:\foobartemp SELECT *.* Rename CASE=extlower Delete d:\foobartemp

What's the real thing you're aiming to do? There's usually a better way than changing folder and selecting files in the lister, although it depends what the goal is.

It's part of a function I use to move files off my camera:

[code]GO /$RX100 DUALPATH /mypictures\dsctemp
SET FLATVIEW=mixednofolders,on

SELECT NONE
SELECT *.(arw|jpg|mts|mp4)
COPY MOVE TO /mypictures\dsctemp FLATVIEWCOPY=single

Set DEST=toggle
SELECT NONE
SELECT *.jpg
Image ROTATE=EXIF HERE REPLACE

SELECT .
Rename CASE=extlower
// and more Rename....[/code]

I would probably turn that into a script... but keeping things simple for now, what's going wrong with that set of commands?

If nothing comes after the Rename commands then it shouldn't matter if they stop things at the end when there are no files, as there's nothing for the rest of the command -- i.e. the Rename commands -- to do. (For that matter, there's nothing for the overall set of commands to do if there are no files to work on.)

Are some details still missing?

Yes, there are a few more non-rename commands following, like setting metadata and opening a new lister and the viewer. Most of the time it will work because there are files on the camera, but testing new code after the Rename commands would be easier, if the execution didn't stop (on a sidenote: a block comment/uncomment in the editor would be nice, too)

Opus' behavior seems a bit odd to me: wouldn't it make more sense to just continue with the execution? Or am I missing the bigger picture?

Sounds like it is related to this:
Button won't run with no selection: Button won't run with no selection

This probably fits very often, but you could have script commands select things again e.g, and then the button would still not run in full. This is because DO and some commands have there own abortion logic implemented it seems.

+1, removing some of this built-in magic is something which was also suggested in the mentioned thread, since all this can become irritating at times. Not completely sure if this should be done though. Things worked liked this for years, there's a risk existing buttons and command sets could fail or act very unexpected unless you introduce some kind @modifier to toggle behaviour to "expected"-mode - so to say. o)