For demo purpose I have saved the latest file name in variable and printed on screen by using Console.Write() method. Using c#, we can do this task. It is very important topic for all the startup developers. Output