Page 1 of 1
Is there any way of catching an error...
Posted: 30 Nov 2017 22:50
by Dustydog
...for things like cancelling out of an interactive rename within a script? Without completely working around it?
I hope this isn't a rtfm situation.
Re: Is there any way of catching an error...
Posted: 30 Nov 2017 23:47
by highend
And your code for an "interactive rename" is?
Re: Is there any way of catching an error...
Posted: 04 Dec 2017 03:56
by Dustydog
Unless I'm getting around it with an input statement for a single rename, I'm just using the most basic possible:
rename b, "$renameTo", p;
I find his preview feature quite convenient. it gives a nicely formatted and width-appropriate last chance with the possibility of using bulk rename syntax to add something to the front or back instead of accepting the entire calculated rename. Suppose I could always just rename to * without cancelling, which for a lack of a better word seems untidy, but that's beyond the scope. (Eventually I'll probably use an edit filenames box, but I'm not there yet as what I'm doing is pretty convoluted and somewhat interactive.)
Was simply curious in general if there was any way of doing an: OnError {Do This;}.
I assume, "No." But thought I'd ask.
Re: Is there any way of catching an error...
Posted: 04 Dec 2017 04:13
by highend
Because that command has no return value, the only way to check would be by
comparing the before / after names
So:
OnError {Do This;}
No, not in a general way...