code: public static <I extends AbstractItem & TopLevelItem> I move(I item, DirectlyModifiableTopLevelItemGroup destination) throws IOException, IllegalArgumentException {
          DirectlyModifiableTopLevelItemGroup oldParent = (DirectlyModifiableTopLevelItemGroup) item.getParent();
          if (oldParent == destination) {
              throw new IllegalArgumentException();
          }
          // TODO verify that destination is to not equal to, or inside, item
          if (!destination.canAdd(item)) {
              throw new IllegalArgumentException();
          }
          String name = item.getName();
          verifyItemDoesNotAlreadyExist(destination, name, null);
          String oldFullName = item.getFullName();
          // TODO AbstractItem.renameTo has a more baroque implementation; factor it out into a utility method perhaps?
          File destDir = destination.getRootDirFor(item);
          FileUtils.forceMkdir(destDir.getParentFile());
          FileUtils.moveDirectory(item.getRootDir(), destDir);
          oldParent.remove(item);
          I newItem = destination.add(item, name);
          item.movedTo(destination, newItem, destDir);
          ItemListener.fireLocationChange(newItem, oldFullName);
          return newItem;
      }
docs: Moves an item between folders (or top level).
  Fires all relevant events but does not verify that the item’s directory is not currently being used in some way (for example by a running build).
  Does not check any permissions.
  @param item some item (job or folder)
  @param destination the destination of the move (a folder or {@link Jenkins}); not the current parent (or you could just call {@link AbstractItem#renameTo})
  @return the new item (usually the same object as {@code item})
  @throws IOException if the move fails, or some subsequent step fails (directory might have already been moved)
  @throws IllegalArgumentException if the move would really be a rename, or the destination cannot accept the item, or the destination already has an item of that name
  @since 1.548