I am having problems with if statement in my routine. I want to simply want the user to choose
if they wnt to create a new folder or not. The routine works but the response I is not what I want. It is
suppose to say ""Folder Does Not Exists! Do You Want to Create a New Folder?" if the folder was not found.
Or, ""Folder Aready Exists!" if it does find the folder. Instead it gives me both messages one after the other.
What am I doing wrong?
------------
-----------------Code:(defun C:MkFoldr (\Foldr1 JobNo FoldrName PathName ChkFoldr) (setq Foldr1 (dos_getdir "Create new CAD Library Folder" "J:\\WMSP\\" "Select destination for the folder" ) ) (dos_chdir Foldr1) (setq JobNo (dos_editbox "Editor" "Enter Job Number" "XXXXX") ) (setq FoldrName (strcat JobNo "-CAD Library")) (setq PathName (strcat Foldr1 FoldrName)) (setq Chkfoldr (dos_dirp PathName) ) ;;this work ok to this point (if (= chkfoldr nil) (progn (setq yes (dos_msgbox "Folder Does Not Exists! Do You Want to Create a New Folder?" "CAD Library Folder" 4 3 ) ) (if (= yes 6) (dos_mkdir PathName) ) (progn (setq yes (dos_msgbox "Folder Aready Exists!" "CAD Library Folder" 1 3 ) ) ) ) )


Reply With Quote
