Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
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
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.
Required, but never shown