code: private void copyHtmlFiles(String startfolder) throws Exception {
  
          try {
              File folder = new File(startfolder);
              // get all subresources
              File[] subresources = folder.listFiles();
              int plainId = OpenCms.getResourceManager().getResourceType(
                  CmsResourceTypePlain.getStaticTypeName()).getTypeId();
              // now loop through all subresources
              for (int i = 0; i < subresources.length; i++) {
                  // if the subresource is a folder, get all subresources of it as well
                  if (subresources[i].isDirectory()) {
                      // first, create the folder in the VFS
                      Hashtable properties = new Hashtable();
                      createFolder(subresources[i].getAbsolutePath(), i, properties);
                      // now process all rescources inside of the folder
                      copyHtmlFiles(subresources[i].getAbsolutePath());
                  } else {
                      // create a new file in the VFS
                      String vfsFileName = (String)m_fileIndex.get(subresources[i].getAbsolutePath().replace('\\', '/'));
                      // check if this is an HTML file, do only import and parse those
                      int type = getFileType(vfsFileName);
                      if (plainId == type) {
                          Hashtable properties = new Hashtable();
                          // the subresource is a file, so start the parsing process
                          String content = "";
                          try {
                              content = parseHtmlFile(subresources[i], properties);
                          } catch (CmsException e) {
                              m_report.println(e);
                          }
                          properties.put("template", m_template);
  
                          // create the file in the VFS
                          createFile(subresources[i].getAbsolutePath(), i, content, properties);
                      }
                  }
              }
          } catch (Exception e) {
              LOG.error(e.getLocalizedMessage(), e);
          }
      }
docs: Copies all  HTML files to the VFS.<p>
  
  @param startfolder the folder to start with
  
  @throws Exception if something goes wrong