I have written a command to batch rename a number of dimstyles:

^C^C-rename dimstyle "ABC 1-192 scale" "1-192 scale"
-rename dimstyle "ABC 2 scale" "2 scale"
-rename dimstyle "ABC 3_4 scale" "3_4 scale"

and it works well, as long as all of the Dimstyles I try to rename exist. If one does not exist, then the script hangs, prompting for the name of a dimstyle.

How can I test for existence of a Dimstyle before trying to rename it?

Andy