help movefile
MOVEFILE Move or rename file or folder.
[STATUS,MESSAGE,MESSAGEID] = MOVEFILE(SOURCE) moves the file or folder
SOURCE to the current folder. MOVEFILE does not preserve the archive
attribute of SOURCE. MOVEFILE cannot move a file onto itself.
[STATUS,MESSAGE,MESSAGEID] = MOVEFILE(SOURCE,DESTINATION) moves
SOURCE to the file or folder DESTINATION. If SOURCE and DESTINATION
are in the same location, then MOVEFILE renames SOURCE to DESTINATION.
If SOURCE ends in a wildcard (*), all matching file objects are moved to
DESTINATION.
[STATUS,MESSAGE,MESSAGEID] = MOVEFILE(SOURCE,DESTINATION,'f') moves
SOURCE to DESTINATION, as above, even if DESTINATION is read-only. The
state of the writable attribute of DESTINATION is preserved.
INPUT ARGUMENTS:
SOURCE: Character vector or string scalar specifying the source
file or folder. SOURCE can be an absolute or relative path.
UNC paths are supported. To copy multiple files or folders,
use wildcards (*).
DESTINATION: Character vector or string scalar specifying the destination
file or folder. DESTINATION can be an absolute or
relative path, but cannot include wildcards (*). UNC paths
are supported.
OUTPUT ARGUMENTS:
STATUS: Logical scalar indicating if the attempt to move
the file or folder is successful. If the attempt
is successful, STATUS is 1. Otherwise, STATUS is 0.
MESSAGE: Character vector containing the error message. If an
error or warning occurs, MESSAGE contains the message text
of the error or warning. Otherwise, MESSAGE is empty ('').
MESSAGEID: Character vector containing the error message identifier.
If an error or warning occurs, MESSAGEID contains the
message identifier of the error or warning. Otherwise,
MESSAGEID is empty ('').
See also CD, COPYFILE, DELETE, DIR, FILEATTRIB, MKDIR, RMDIR.
Documentation for movefile
doc movefile