title: Create directory based on date/time and copy files to it?
body: <p>I'm attempting to create a script that will create a folder based on the current time and date. I then need the script to copy the files from a source folder to the newly created folder. I then need it to copy folders from a second source folder to the original source folder, overwriting everything that's in there. </p>
  
  <p>Below is what I've tried, and it's failing in quite an epic fashion. </p>
  
  <pre><code>#!/bin/bash
  
  d="/home/$(date +%d-%m-%y")"
  mkdir "$d"
  cp /home/test "$d"
  cp /home/test2 /home/test
  </code></pre>
  
  <p>I'm aware that I don't have to define the variable, as the time between copies should be seconds and not lapse a day, but I wanted to make sure and honestly, I'm interested in learning to use variables in scripting.</p>