/* This program moves a file to a new destination and then
   deletes the original file. If file is a directory, the contents
   are moved but not deleted.

                   Jim McDaniel 7/12/94 
				   jmcdanie@mailer.fsu.edu
*/

#include <stdio.h>
#include <string.h>

int i;
char cmd[64];
char cmd2[64];

void main(int argc, char * argv[])
{
	if(argc != 3)
	{
		printf(" Usage:  Move [path]filename newpath[filename]\n");
		printf("                source           destination  \n");
		printf("                deleted            created    \n");
		exit(0);
	}
	else
	{
		strcpy(cmd,"copy ");
		strcat(cmd,argv[1]);
		strcat(cmd," ");
		strcat(cmd,argv[2]);
		Execute(cmd,NULL,NULL);

		strcpy(cmd2,"delete ");
		strcat(cmd2,argv[1]);
		Execute(cmd2,NULL,NULL);

		printf("\033[F");
		printf("%s copied to %s and source deleted!\n",argv[1],argv[2]);

	}
	exit(0);
}

