title: How to specify cleanup by file age or date with pg_archivecleanup
body: <p>Is there a way to specify files by age or date instead of by a hardcoded name to cleanup the WAL archives with the pg_archivecleanup command ?</p>
  
  <p>For example, using the following command is pretty straightforward:</p>
  
  <pre><code>pg_archivecleanup "C:\Program Files\PostgreSQL\9.2\data\pg_xlog" 000000010000004600000045
  </code></pre>
  
  <p>where 000000010000004600000045 is the file name, and any file created before will be deleted.</p>
  
  <p>However, if I want to automate the process, there must be a way to choose the files by age/date.</p>