You could issue the command, then check if a command is still active. E.g. (untested):
Code:
(command "EXPORTTOAUTOCAD" "2010" DWGN2)
(while (> (getvar 'CmdActive) 0) (command "YES"))
Alternatively you could check if the file already exists, then use vl-file-delete to delete it before exporting.
BTW, your code has some extra parenthesis: e.g.
Code:
((if(findfile DWGN2)) ...
Thus the if statement returns a T and that is then interpreted as a function to be called. The T is not a function and would produce an error.