code: public void cd(String target) throws Exception {
  
          String folder = CmsResource.getFolderPath(m_cms.getRequestContext().getUri());
          if (!target.endsWith("/")) {
              target += "/";
          }
          String resolvedTarget = CmsLinkManager.getAbsoluteUri(target, folder);
          CmsResource res = m_cms.readResource(resolvedTarget);
          if (!res.isFolder()) {
              throw new CmsIllegalArgumentException(
                  Messages.get().container(Messages.ERR_NOT_A_FOLDER_1, resolvedTarget));
          }
          m_cms.getRequestContext().setUri(resolvedTarget);
          m_shell.getOut().println(
              '\n' + getMessages().key(Messages.GUI_SHELL_CURRENT_FOLDER_1, new Object[] {resolvedTarget}));
          m_shell.getOut().println();
      }
docs: Changes the current folder (i.e. the URI in the VFS).<p>
  
  @param target the new URI
  @throws Exception if something goes wrong
  @see org.opencms.file.CmsRequestContext#setUri(String)