Hey guys I'm having troubles figuring this out. I am trying to copy a bunch of files in a directory to a different here's what i have
this is my error when i try to copy from /home/TEST to /home/1231232141243Code:if ((from = fopen(filepath, "rb")) == NULL) { printf("Cannot open source file.\n"); exit(1); } //printf("opened source file\n"); // open destination file if ((to = fopen(backupdir, "wb")) == NULL) { printf("Cannot open destination file.\n"); exit(1); }
Frustrating because I got it to work and didn't think it worked and so deleted some code :\
New directory /home/1231232141243 created successfully.
Backup file dir: /home/1231232141243/Copyof-1.txt/
Cannot open destination file.



LinkBack URL
About LinkBacks


