(defun C:autorename-files-by-txt-list (/ FOLDER-PATCH LIST-TXT-LIST LIST_FILES TXT-LIST TXT-LIST-PATCH)
  ; переименовывает файлы в директории по текттовому файлу, файл "1234.tif" (строка текста "1234\t987") => "987=1234.tif"
  
  (setq folder-patch "d:\\tif")
  (setq txt-list-patch "d:\\list.txt")
  (setq list_files (file_find_be_extension folder-patch "tif"))
  (setq txt-list(file_read_to_list txt-list-patch))
  (foreach x txt-list
    (setq list-txt-list (append list-txt-list (list (convert-string-to-list-be-delimiter x "\t"))))
    )
  (foreach item list-txt-list
;;;    (terpri)
;;;    (princ (strcat folder-patch "\\" (nth 0 item) ".tif"))
;;;    (princ "=>")
    (if (file_check (strcat folder-patch "\\" (nth 0 item) ".tif"))
      (progn
;;;      (princ (strcat folder-patch "\\" (nth 0 item) ".tif"))
;;;      (princ "=>")
;;;      (princ (strcat folder-patch "\\" (nth 1 item)"="(nth 0 item) ".tif"))
      
      (vl-file-rename (strcat folder-patch "\\" (nth 0 item) ".tif") (strcat folder-patch "\\" (nth 1 item)"="(nth 0 item) ".tif"))
;;;	(princ T)
      )
;;;      (princ nil)
      )
    )
  (princ)
  )