(defun C:insert_all_dwg_in_folder ( / list_files ln n)
  (load_global_variable)
  (setq list_files (file_find_be_extension "d:\\саратов 500" "dwg"))
  (setq ln (itoa (length list_files)))
  (setq n 0)
  (foreach x (reverse list_files)
    (grtext -1 (strcat(itoa n)"/"ln))
    (command "_insert" x "0,0" "" "" "")
    (command "_explode" (entlast))
    (if(tblobjname "block" (vl-filename-base x))(command "_-purge" "Б" (vl-filename-base x) "Н"))
    (setq n (1+ n))
    )
  (grtext -1 "")
  (princ)
  )

;;;(command "_insert" "d:\\002k\\dxf\\2-3-G.dxf" "100,200" 2 "" "")