Thank you!
Edit the command in the viewer toolbar so that it runs this (but see below for what I think is a better version):
Delete {file|ext=*}
Show VIEWERCMD=refresh
(If needed, click Advanced in the button editor to switch it into multi-line mode.)
I think the main issue with lxp's original command was just due to filepaths with spaces causing automatic quoting, which then didn't work properly with .*
added to the end of the path. Doing it this slightly different way means that Opus replaces the extension itself.
The second line was also added so that the viewer moves to the next file after you delete the current one. (The viewer will close if there are no more images and it's configured to do that.)
Important note: This seems slightly dangerous as-is. If you have these files:
Then running the command on the first file will delete Cat.*
which will delete both files, even though the second file doesn't really have anything to do with the first one.
Maybe you actually want that. If not, I think this is better:
Delete {file|ext=#[~.]}
Show VIEWERCMD=refresh
Using the same example, that will only delete files named Cat.X
where X
is any string that does not contain any .
characters. So it would delete Cat.jpg
and Cat.txt
but it would not delete Cat.2.bmp
.
You could also do this if you want to only delete specific extensions (.bmp
and .jpg
in this example):
Delete {file|ext="(bmp|jpg)"}
Show VIEWERCMD=refresh
Note that if the current file doesn't actually have one of those extensions then it won't be deleted, but the matching files still will be.
Whichever you use, make sure the Recycle Bin is enabled while testing, in case it doesn't do exactly what you expect.