CCL Home Page
Up Directory CCL mv_file
#include "utility.h"

void mv_file(source_file_name,target_name)
/*============================================================================*/
/* PURPOSE: DO A UNIX "MV SOURCE_FILE_NAME TARGET_NAME" FOR THE SPECIFIED
/*	SOURCE AND TARGET.
/* INPUTS:
/*	SOURCE_FILE_NAME	SOURCE FILE TO BE MOVED.
/*	TARGET_NAME		DESTINATION (DIRECTORY OR FILE).
/* OUTPUTS:
/*	NONE
/* WRITTEN: M.V.GRIESHABER
/* LAST MODIFICATION: 11 JUNE 1991 MVG
*/
   char source_file_name[];	/* SOURCE FILE TO BE MOVED. */
   char target_name[];		/* WHERE TO MOVE THE FILE. */
   {
   char system_cmd[1000];	/* COMMAND FOR SYSTEM CALL. */

   /* CREATE THE SYSTEM COMMAND "MV SOURCE TARGET". */
   strcpy(system_cmd,"mv -f ");
   strcat(system_cmd,source_file_name);
   strcat(system_cmd," ");
   strcat(system_cmd,target_name);

   system(system_cmd);

   return;
   }
Modified: Fri Feb 11 17:00:00 1994 GMT
Page accessed 4913 times since Sat Apr 17 21:58:58 1999 GMT