Is it better to delete files from a folder over 30 days old using a C# program, or some sort of Batch script? : <p>I'm unfamiliar with creating batch files. I really don't get how they work or what they can do. What I do know is how to write a c# program. </p>

<p>If I want to have an automated process that runs probably once a day to delete files older than 30 days, would it be better to make a batch script, or some sort of task that runs the c# program?</p>

<p>Should the program keep track of files it knows will expire tomorrow and just delete by name? Or should it scan the whole folder every day? Seems like a waste to do that, but it makes it very simple.</p>

<p>I know it can be done both ways and there's a lot of material on both, but what I really want to know is what's the difference?</p>
