Function: treemacs-move-file

treemacs-move-file is an autoloaded, interactive and byte-compiled function defined in treemacs-file-management.el.

Signature

(treemacs-move-file)

Documentation

Move file (or directory) at point.

If the selected target is an existing directory the source file will be directly moved into this directory. If the given target instead does not exist then it will be treated as the moved file's new name, meaning the original source file will be both moved and renamed.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-file-management.el
;;;###autoload
(defun treemacs-move-file ()
  "Move file (or directory) at point.

If the selected target is an existing directory the source file will be directly
moved into this directory.  If the given target instead does not exist then it
will be treated as the moved file's new name, meaning the original source file
will be both moved and renamed."
  (interactive)
  (treemacs--copy-or-move
   :action 'move
   :no-node-msg "There is nothing to move here."
   :wrong-type-msg "Only files and directories can be moved."
   :action-fn #'rename-file
   :prompt "Move to: "
   :flat-prompt "File to copy: "
   :finish-verb "Moved"))