|   | #2rjsp2019-07-04 19:14 | 
    #include<stdio.h>
#include<stdlib.h>
void string(char pp[]);//给被复制的文件的文件名进行去双引号的函数 1
void string_1(char vv[]);// 给被复制的文件的文件名进行去双引号的函数 2
char io[100],uu[100];//定义全局变量,保证数据离开被调函数后不会被销毁,用来存放经函数去掉引号后的字符串 
int mm=0;
int main()
{
    FILE *fp,*f,*oj;
    char a[100],b[100],ch,aj[100];
    
    
    puts("PS1: the function of this program is to copy one\nspecified file into another specified fileand\nthen destroy the contents of the copied file!");
    puts("\n\n");
    printf("PS2: You can drag files directly in.\n");
    puts("\n\n");
    puts("PS3: You can only copy and paste documents of the same kind!");
    putchar('\n');
    putchar('\n');
    puts("Please enter a file name to copy:");
    gets(b);//输入原始的被复制文件的文件名 
    string(b);//调用函数去掉被复制文件的文件名中可能出现的双引号 
    putchar('\n');
    puts("Please enter the file name to be pasted:");
    gets(a);//输入原始的要粘贴文件的文件名 
    string_1(a);//调用函数去掉要粘贴文件的文件名中可能出现的双引号 
    putchar('\n');
    fp=fopen(uu,"ab+");//使用去掉双引号后的文件名打开要粘贴的文件 
    if(!fp)
    {
        printf("Can not open the file %s",uu);
        system("pause");
        return 0;
    }
    f=fopen(io,"rb");//使用去掉双引号后的文件名打开被复制的文件 
    if(!f)
    {
        printf("Can not open the file %s",io);
        system("pause");
        return 0;
    }
    while(!(feof(f)))
    {
        ch=fgetc(f);
        fputc(ch,fp);
    }
    fclose(fp);//关闭要粘贴的文件 
    fclose(f);//关闭被复制的文件 
    oj=fopen(io,"wb");//重新打开被复制的文件,并且把其中的数据删除 
    if(!oj)
    {
        printf("Can not destroy files %s",b);
        return 0;
    }
    fclose(oj);
    puts("Done!\n");
    system("pause");
    return 0;
}
void string(char pp[])//去文件名中双引号的函数定义1 
{
    int rr=0;
    while(pp[rr]!='\0')
    {
        if(pp[rr]!='"')
        {
            io[mm]=pp[rr];
            mm++;
        }
        rr++;
    }
}
void string_1(char vv[])//去文件名中双引号的函数定义2 
{
    int o=0;
    int y=0;
    while(vv[o]!='\0')
    {
        if(vv[o]!='"')
        {
            uu[y]=vv[o];
            y++;
        }
        o++;
    }
}  


 程序代码:
程序代码: