code: def copy_directory(src, dest, force=False):
      ''' Copy an entire directory recursively
      '''
      if os.path.exists(dest) and force is True:
          shutil.rmtree(dest)
  
      try:
          shutil.copytree(src, dest)
      except OSError as e:
          # If the error was caused because the source wasn't a directory
          if e.errno == errno.ENOTDIR:
              shutil.copy(src, dest)
          else:
              bot.error('Directory not copied. Error: %s' % e)
              sys.exit(1f copy_directory(src, dest, force=False):
      ''' Copy an entire directory recursively
      '''
      if os.path.exists(dest) and force is True:
          shutil.rmtree(dest)
  
      try:
          shutil.copytree(src, dest)
      except OSError as e:
          # If the error was caused because the source wasn't a directory
          if e.errno == errno.ENOTDIR:
              shutil.copy(src, dest)
          else:
              bot.error('Directory not copied. Error: %s' % e)
              sys.exit(1)
docs: Copy an entire directory recursively