Home > data-utility > move_subject_file.m

move_subject_file

PURPOSE ^

MOVE_SUBJECT_FILE Move a file from one place in a subject dir to another

SYNOPSIS ^

function move_subject_file(subject, source, dest, varargin)

DESCRIPTION ^

MOVE_SUBJECT_FILE Move a file from one place in a subject dir to another

 Usage:
   move_subject_file(SUBJECT, SOURCE, DESTINATION)
       Within the SUBJECT's directory, move a file from one place to
       another.  If the DESTINATION file already exists, or if the SOURCE
       file does not exist, an exception is thrown.  MOVEFILE, which is
       used internally, may also throw exceptions of its own.  If the
       DESTINATION's directory is not there, we try to make it.

   move_subject_file(..., 'dry')
       A "dry run": show what would be done.  If an exception would be
       thrown, it is thrown in this case too (except for ones generated
       directly by MOVEFILE).

   move_subject_file(..., 'quiet')
       Don't say what's happening.

   move_subject_file(..., 'force')
       Don't give up if the destination file already exists.  Try to move
       over it, if possible.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function move_subject_file(subject, source, dest, varargin)
0002 %MOVE_SUBJECT_FILE Move a file from one place in a subject dir to another
0003 %
0004 % Usage:
0005 %   move_subject_file(SUBJECT, SOURCE, DESTINATION)
0006 %       Within the SUBJECT's directory, move a file from one place to
0007 %       another.  If the DESTINATION file already exists, or if the SOURCE
0008 %       file does not exist, an exception is thrown.  MOVEFILE, which is
0009 %       used internally, may also throw exceptions of its own.  If the
0010 %       DESTINATION's directory is not there, we try to make it.
0011 %
0012 %   move_subject_file(..., 'dry')
0013 %       A "dry run": show what would be done.  If an exception would be
0014 %       thrown, it is thrown in this case too (except for ones generated
0015 %       directly by MOVEFILE).
0016 %
0017 %   move_subject_file(..., 'quiet')
0018 %       Don't say what's happening.
0019 %
0020 %   move_subject_file(..., 'force')
0021 %       Don't give up if the destination file already exists.  Try to move
0022 %       over it, if possible.
0023 %
0024 copymove_subject_file('move', subject, source, dest, varargin{:});

Generated on Tue 23-May-2017 20:00:55 by m2html © 2005