title: Move files based on text content
body: <p>I have about 1000 files (they are not .txt, but they do contain text) that I want to move into subdirectories based on a specific part of the content of the files. Each line contains one or more copies of the string </p>
  
  <pre><code>DTM+137:20131001
  </code></pre>
  
  <p>where the last eight digits are a date. I want to move a file with the above string to a subfolder named <code>\01.10.2013\</code>. Finding the string is easy enough with regex, but I don't have enough experience with any language to make it all work. I tried with Perl, but I didn't get very far.</p>