I don't get it, I'm doing exactly the same, but I get that warning.
It compiles fine however, when I change the argument in the function to a char instead of a const char.

And memcpy does seem to work. I've tested it by putting a user given string into the array and then reading out the array. It works:

Code:
    int lines_in_file0 = 0;
    char filenames[10][512];
    char* datafile[1000];
    

    printf("Give the name of the file you wish to analyze.\n");
    printf("-> ");
    
    scanf("%s", &datafile);
    printf("\n");
    
    memcpy(filenames[0], datafile, 512);
    printf("filename placed in array: %s", filenames[0]);

But this is in the main, and maybe a different situation. I've changed it in the "Analyse3" function to what you said.