code: public static Action moveFileToEmptyPath(final String srcPath, final String destPath) {
          if (srcPath == null)
              throw new IllegalArgumentException("The srcPath variable cannot be null");
          if (destPath == null)
              throw new IllegalArgumentException("The destPath variable cannot be null");
  
          return new Action(
              // Perform:
              new ActionBlock() {
                  @Override
                  public void execute() throws ActionException {
                      File destFile = new File(destPath);
                      if (destFile.exists())
                          throw new ActionException("Cannot move file. " +
                                  "The Destination file " + destPath + " already exists.");
                      boolean success = new File(srcPath).renameTo(destFile);
                      if (!success)
                          throw new ActionException("Cannot move file " + srcPath +
                                  " to " + destPath);
                  }
              },
              // Backout:
              new ActionBlock() {
                  @Override
                  public void execute() throws ActionException {
                      boolean success = new File(destPath).renameTo(new File(srcPath));
                      if (!success)
                          throw new ActionException("Cannot move file " + destPath +
                                  " to " + srcPath);
                  }
              },
              // Cleanup:
              null);
      }
docs: Moves the file/directory to a new location, which must not already exist.
  @param srcPath Source path
  @param destPath Destination path which must not exist
  @return A moveFileToEmptyPath action