code: public void renameTo( SmbFile dest ) throws SmbException {
          if( getUncPath0().length() == 1 || dest.getUncPath0().length() == 1 ) {
              throw new SmbException( "Invalid operation for workgroups, servers, or shares" );
          }
  
          resolveDfs(null);
          dest.resolveDfs(null);
  
          if (!tree.equals(dest.tree)) {
              throw new SmbException( "Invalid operation for workgroups, servers, or shares" );
          }
  
          if( log.level >= 3 )
              log.println( "renameTo: " + unc + " -> " + dest.unc );
  
          attrExpiration = sizeExpiration = 0;
          dest.attrExpiration = 0;
  
          /*
           * Rename Request / Response
           */
  
          send( new SmbComRename( unc, dest.unc ), blank_resp() );
      }
docs: Changes the name of the file this <code>SmbFile</code> represents to the name
  designated by the <code>SmbFile</code> argument.
  <p/>
  <i>Remember: <code>SmbFile</code>s are immutible and therefore
  the path associated with this <code>SmbFile</code> object will not
  change). To access the renamed file it is necessary to construct a
  new <tt>SmbFile</tt></i>.
  
  @param  dest  An <code>SmbFile</code> that represents the new pathname
  @throws NullPointerException
  If the <code>dest</code> argument is <code>null</code>