1

I was trying to make a CMD file that just loops and searches for age of files in a folder. If the files in that folder are older that 1 min it just deletes them, if not it lets them sit there.

Is this possible in CMD? Or is there a language that is simple and easy to do like CMD that can do this task?

Thanks Matt

Matt Biggs
  • 179
  • 1
  • 4
  • 15
  • Depends on what you really mean by 'older than a minute' and how exact you're looking to be. It's a granularity thing. For instance, suppose a file is created at 12:00:30. Strictly, '1 minute' means delete it at 12:01:30. Loosely, it could mean 'delete it at 12:02:00' so it would have a theoretical lifetime of 1 to not-quite-2 minutes. Which way do you want it? – Magoo Apr 13 '14 at 05:19
  • I can provide a solution that I have posted before - it's not simple to do with CMD - which OS are you using? – foxidrive Apr 13 '14 at 11:55
  • I would be really interested to see if you could make a batch file that would delete files younger then a minute – Roke Sep 13 '15 at 15:52

0 Answers0