title: How to read the file name in a directory and print as output using timestamp
body: <p>I have a particular folder(Test) in my D drive. Every week a new folder gets created inside test like 1234,4231,etc. I want to write a python script which can print the folder name recently created. I was able to do upto this. </p>
  
  <pre><code>import os
  
  for file in os.listdir("D:\Test1"):
  if file.endswith(".txt"):
      #print(os.path.join("/mydir", file))
      s = os.path.join("/mydir", file)
  </code></pre>