Hey guys I'm currently writting a basic encryption program which works flawless on all types of files.
Unfortunately when I attempt to run it on a folder instead of individual files my fopen function always returns NULL.
Is there some sort of hidden file extension for Windows folders that I need to include with the folder name, or maybe some other way I should go about this?
Here is my basic open file code that works fine on all file types except folders:
int count, key, random, flag;
char ORGfile = "ORGfolder"; //original folder name
char ENCfile = "ENCfolder"; //encrypted folder name
FILE *in, *out;
printf("\nEnter encryption key: ");
key = atoi(str);
if (( in = fopen(ORGfile, "rb")) == NULL)
printf("\n\t\..........* ERROR: unable to open file for reading ***\n");
//the rest has been omitted since it has nothing to do with this question...