Hi all,
Im trying to use a variable as a path in C. For instance, the user enters a directory and this is used with the '*.*' notation attached so the program loops all files in the directory. I've got the PHP part of this code working in a separate part of the program but dont seem to be able to get it working in C. I've attached the example code below, any ideas?
Thank you for your time,
const char directory[50];
printf("Please enter directory to open: \n");
scanf("%s@, directory);
const char directoryfile[60] = "directory\\*.*";
do
{
...
If the user entered C:\Test as the directory
then
the directoryfile should become "C:\Test\file1.doc" etc.
Thanks again