Search code examples
emacsdired

copy files with folders


How to copy selected files with folders in emacs dired-mode? The problem I've faced is the next one: when I'm pressing the 'C' button to copy selected files with folders to an other folder, I'm pointing dir, and then emacs starts to copy files (files are copied OK) but then content of selected folders - not folders actually!..

Initial dirs content:

Initial dirs content

Ready to copy:

Ready to copy

Press C:

Pressed C

Press Enter:

Pressed Enter

Press y:

Pressed y

Press g on both frames:

Pressed g on both frames

As you can see - the dir 1 wasn't copyed to dir 2, but only it's content. This couses a problem when copying a selection with files and folders.


Solution

  • (require 'ls-lisp)
    (setq ls-lisp-use-insert-directory-program nil)
    

    solved my problem.