Function: dired-do-symlink

dired-do-symlink is an autoloaded, interactive and byte-compiled function defined in dired-aux.el.gz.

Signature

(dired-do-symlink &optional ARG)

Documentation

Make symbolic links to current file or all marked (or next ARG) files.

When operating on just the current file, you specify the new name. When operating on multiple or marked files, you specify a directory and new symbolic links are made in that directory with the same names that the files currently have. The default suggested for the target directory depends on the value of dired-dwim-target, which see.

For relative symlinks, use M-x dired-do-relsymlink (dired-do-relsymlink).

Also see dired-do-revert-buffer.

Probably introduced at or before Emacs version 28.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/dired-aux.el.gz
;;;###autoload
(defun dired-do-symlink (&optional arg)
  "Make symbolic links to current file or all marked (or next ARG) files.
When operating on just the current file, you specify the new name.
When operating on multiple or marked files, you specify a directory
and new symbolic links are made in that directory
with the same names that the files currently have.  The default
suggested for the target directory depends on the value of
`dired-dwim-target', which see.

For relative symlinks, use \\[dired-do-relsymlink].

Also see `dired-do-revert-buffer'."
  (interactive "P")
  (dired-do-create-files 'symlink #'make-symbolic-link
                         "Symlink" arg dired-keep-marker-symlink))