code: def move(srcpath, dstpath, overwrite=True):
      
      # TODO: (JRR@201612230924) Consider adding smarter checks to prevent files ending up with directory names; e.g. if dstpath directory does not exist.
      if not op.exists(srcpath):
          return False
      if srcpath == dstpath:
          return True
      if op.isfile(srcpath) and op.isdir(dstpath):
          verfunc = op.isfile
          verpath = op.join(dstpath, op.basename(srcpath))
      elif op.isfile(srcpath):
          verfunc = op.isfile
          verpath = dstpath
          makedirs(dstpath)
      elif op.isdir(srcpath) and op.isdir(dstpath):
          verfunc = op.isdir
          verpath = op.join(dstpath, op.basename(srcpath))
      elif op.isdir(srcpath):
          verfunc = op.isdir
          verpath = dstpath
      else:
          return False
      if op.isfile(verpath):
          if not overwrite:
              return False
          else:
              # On Windows, filename case is ignored so the following check will
              # prevent unintentionally deleting the srcpath before moving.
              if "nt" == os.name and srcpath.lower() == dstpath.lower():
                  pass
              elif not delete(verpath):
                  return False
      try:
          shutil.move(srcpath, dstpath)
      except:
          return False
      return verfunc(verpath)
docs: Moves the file or directory at `srcpath` to `dstpath`. Returns True if
      successful, False otherwise.