How to get a last created file from a directory

  • Thread starter Thread starter Avatar 123
  • Start date Start date
A

Avatar 123

Guest
I will be regularly creating files under a folder, File name will be constant name appending an random integer at the end (example file names will be like xyz980, xyz123, xyz234, xyz456 etc).



I want write some logic to delete the last created file form the list of files which name starts with xyz.


Can some one please help me in the logic?

Continue reading...
 
Back
Top