How to Move Files in Emacs
How to Move Files in Emacs
To move files in Emacs, you can use Dired mode (Emacs’ built-in file manager), which makes it straightforward. Here’s how:
✅ Steps to Move a File Using Dired:
-
Open Dired Press:
C-x d(that’sCtrl + x, thend) Then enter the directory path where your file is located and pressRET. -
Mark the File(s) to Move Move the cursor to the file you want to move, then press
mto mark it. (You can mark multiple files if needed.) -
Copy or Rename (Move)
- To move, press
R(Shift + r) — stands for Rename. -
You’ll be prompted for a destination. Enter the full path, or just the target directory.
- If the destination is a directory, the file(s) will be moved there.
- If it’s a filename, the file will be renamed/moved accordingly.
- To move, press
-
Confirm Press
yto confirm the move.
🧠 Notes:
- Emacs uses “Rename” (
R) to move files — it renames the file, possibly to a different directory. - If you just want to copy (not move), use
Cin Dired mode instead ofR.