5 char* convert_path(char* origpath)
10 newpath = strdup(origpath);
13 while (newpath[i] != 0)
16 if (newpath[i] == '\\')
22 if (newpath[i] == '/')
33 #define TRANSFER_SIZE (65536)
35 int main(int argc, char* argv[])
47 fprintf(stderr, "Too many arguments\n");
51 path1 = convert_path(argv[1]);
52 path2 = convert_path(argv[2]);
54 in = fopen(path1, "rb");
57 perror("Cannot open input file");
63 out = fopen(path2, "wb");
66 perror("Cannot open output file");
71 buf = malloc(TRANSFER_SIZE);
75 n_in = fread(buf, 1, TRANSFER_SIZE, in);
76 n_out = fwrite(buf, 1, n_in, out);
79 perror("Failed to write to output file\n");