Renaming Files

You may rename or move files, folders, and symbolic links on the server, to a new pathname, provided that you have sufficient permissions.

To request change the path of a remote object, use the "–m" option as shown below:

movedat -m [user@]host:path newpath

All directories in the new path must exist, unless -B BuildPath is specified.

Examples

To change the name of file "foo" to "bar" within the folder "subdir":

movedat -m me@example.com:subdir/foo subdir/bar

To move the file "bar" from folder "subdir" to folder "otherdir":

movedat -m me@example.com:subdir/bar otherdir/bar

To move the file "bar" from the home folder "otherdir" to the root path (assuming the user has permission to do so):

movedat -m me@example.com:otherdir/bar /bar

To rename the folder "subdir" to "subfolder":

movedat -m me@example.com:subdir subfolder

Caveats

The destination path must always include the intended name of the file.  If you only specify a destination directory, the operation may fail with an "Is directory" or similar error.

movedat -m me@example.com:/bar subdir/ example.com:bar Failed: Remote Application: Invalid Pathname Is a directory

That behavior may vary depending on the server operating system, so specifying the full destination path is always recommended.

Case sensitivity varies by operating system and file system.  Changing only the capitalization of a file name may cause unexpected results.

Renaming a symbolic link will change the name or path of the link itself, but will not change the target path.  As always, moving a symbolic link which has a relative target path may break the link.