What is the function to move files? I want to emulate the following shell command:
mv file dir
As described here, the closest is rename-file
, but this would be emulating this:
mv file newfile
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityWhat is the function to move files? I want to emulate the following shell command:
mv file dir
As described here, the closest is rename-file
, but this would be emulating this:
mv file newfile
That function can actually move files to directories, but its documentation was not in accord with its features. If the destination ends in a /, then the file is moved. e.g.
(rename-file "foo" "bar/")
will move foo into the directory bar.