Use Emacs as a two-paned FTP client

I’ve written before about using sunrise commander for two-paned dired allowing an intuitive way to copy files between directories. You can also use sunrise to connect to an ftp server. For example in sunrise commander I hit j to go to a new directory and enter / which prompts me for my password and then connects to the top level directory of my site. Note that the syntax is important – in this case I don’t need to specify I am using an ftp connection since the host name starts with ftp, but the trailing colon is needed to specify the top level directory. The full syntax is described in the manual.

Now you can have the local directory in the left pane and the remote directory in the right pane, and copy files back and forth. Of course the same approach can be used to connect to an ftp server in normal dired, but I find the two-paned view of sunrise commander particularly intuitive here.

  • jtgd

    Dired can be used like a two-paned file manager. If you have two windows open with dired in each, and do a Copy or Rename, it will suggest the other window as the destination and you just hit enter.

    • Yes, you are quite right (maybe worth pointing out that this doesn’t work if you have dired windows in separate frames). For some reason I prefer doing this in sunrise commander though I’m not sure I can really explain why! It is probably just because I have a shortcut set up to open a new frame with sunrise commander resized nicely to fit the windows side by side.

    • Phil

      Readers may need to set the `dired-dwim-target` variable in order to get this behaviour.