(defun i/move-to-new-directory ()
  (interactive)
  (let ((new-directory (dired-current-directory)))
    (with-temp-buffer
      (insert-file-contents "/tmp/curr")
      (goto-char (point-min))
      (while (not (eobp))
        (let ((line (string-trim (thing-at-point 'line t))))
          (start-process "mv-process" nil "mv" "-f" line new-directory))
        (forward-line 1))
      (message "Finish"))))


(defun i/copy-to-new-directory ()
  (interactive)
  (let ((new-directory (dired-current-directory)))
   (with-temp-buffer
    (insert-file-contents "/tmp/curr")
    (goto-char (point-min))
    (while (not (eobp))
      (let ((line (thing-at-point 'line t)))
        (async-shell-command (concat "copy " (replace-regexp-in-string "\n" "" line) " " new-directory)))
      (forward-line 1))
    (message "Finish"))))


(defun i/clear-marks ()
  (interactive)
  (shell-command "rm /tmp/curr"))
