Open file1.txt
using C-x C-f
(find-file
). Press M-!
to execute shell-command
. The command you want to execute is copy
:
copy /b file1.txt + file2.txt + file2.txt file1.txt
Reload the buffer using M-x revert-buffer
to see that indeed the files were appended. Beware! The copy
command will overwrite file1.txt
.
If you don't have file1.txt
open, then the default-directory
will not be for the correct folder. You would need to either issue cd
first to change the default directory for the current buffer or use absolute paths.