Same method to export different txt files C#
I don't have much reputations to comment so trying to help for what I know and modified your code according to the need -

There are two issues I observed -


The below line in your code -



  var userPath = Path.Combine(dir,Enum.GetName(typeof(exportByName),0),".txt");


will generate the output "directory+name of array\.txt" instead of 
  "directory+name of array+.txt"


You mentioned the point saying "the file is not created", actually your code 
is just returning the path using Path.Combine you need to create file for each of the ENUM values using the File.WriteAllText method.


I have modified your code and placed below. Please check 

class Program
    {
        enum exportByName { Client, Appointment, Address, Location, Historic }


        static string askPath(int count)
        {
            var dir = "";

            do
            {
                Console.Clear();
                Console.Write("Insert path to export the txt file: ");
                dir = Console.ReadLine();
            } while (String.IsNullOrEmpty(dir));


            var userPath = Path.Combine(dir, Path.GetFileName((Enum.GetName(typeof(exportByName), count))) + ".txt");
            return userPath;
        }
        static void Main(string[] args)
        {

            for (int i = 0; i &lt; 4; i++)
            {
                var path = askPath(i);
                if (!File.Exists(path))  // if it doesn't exist, create

                    File.WriteAllText(path, "add text here");
            }
        }


    }


Hope this helps!