Emacs: Zip Dir in Dired
(defun xah-dired-to-zip () "Zip the current file in `dired'. If multiple files are marked, only zip the first one. Require unix zip command line tool. URL `http://ergoemacs.org/emacs/emacs_dired_zip_dir.html' Version 2021-01-14" (interactive) (let ( (fName (elt (dired-get-marked-files) 0))) (shell-command (format "zip -r %s %s" (shell-quote-argument (concat (file-relative-name fName) ".zip")) (shell-quote-argument (file-relative-name fName))))))
If you have a question, put $5 at patreon and message me on xah discord.
Or support me by Buy Xah Emacs Tutorial