The code I've given above does a case-sensitive check for the .NEW file-extension since that's what your original code was doing. Do the files you're using have lowercase or mixed-case extensions (eg .new .New)? If so just change the usage of !iswmcs in the code to !iswm


Spelling mistakes, grammatical errors, and stupid comments are intentional.