utility
|
cmd_head.c,
count_tokens.c,
cp_file.c,
errmsg.c,
file_opened.c,
find_line.c,
find_string.c,
fn_base.c,
fn_dir.c,
fn_ext.c,
fn_root.c,
gchoice.c,
gdata_line.c,
gdouble.c,
gfield.c,
gint.c,
gntoken.c,
graphics_ok.c,
gstring.c,
lock.c,
lower.c,
mat_multiply.c,
mat_transform.c,
mat_transpose.c,
mv_file.c,
new_extension.c,
nolead.c,
notrail.c,
ordinal.c,
pfield.c,
squish_blanks.c,
test.c,
unlock.c,
upper.c,
utility.h,
utility.make,
valchars.c,
vec_angle.c,
vec_crossprod.c,
vec_diff.c,
vec_dotprod.c,
vec_length.c,
vec_norm.c,
|
|
|
#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;
}
|