code: public String getRelativePath(File from, File to) {
          Path fromPath = Paths.get(from.getPath()).normalize().toAbsolutePath();
          Path toPath = Paths.get(to.getPath()).normalize().toAbsolutePath();
          return fromPath.relativize(toPath).toString().replace('\\', '/');
      }
docs: Returns 'to' file or dir path relative to 'from' dir.
  Result always uses forward slashes and has no trailing slash.