title: How do I give Channel Directory (Checkpoint & Data Dir) name Date Dynamically
body: <p>I use Channel as a backup in flume without any sink and it's working correctly. Below is my working code, but how can I give directory or file name dynamically? (I want to give name date wise when date is change new directory is created Dynamically and exist previous as a backup.)</p>
  
  <pre><code># Name the components on this agent
  a1.sources = r1
  a1.channels =c1
  
  # Describe/configure the source r1
  a1.sources.r1.type = http
  a1.sources.r1.port = 40441
  a1.sources.r1.bind = X.X.X.X
  a1.sources.r1.channels = c1
  
  # Use a channel which buffers events in file
  a1.channels.c1.type = file
  a1.channels.c1.dataDirs = /data/disk11/flume/Test/dataDirs{**%y%m%d**}
  a1.channels.c1.checkpointDir =data/disk11/flume/Test/checkpointDir{**%y%m%d**}
  a1.channels.c1.capacity = 1000
  a1.channels.c1.transactionCapacity = 100
  </code></pre>