Question: Is there a way to import folders and subfolders into an existing RoboHelp HTML project?
Answer: You can't import folders and subfolders into RoboHelp directly, but you can by following the steps outlined in this month's tip. This technique is useful when you have many HTML files to import into a project, but no solution is offered for importing index entries, table of contents entries, or any files stored outside the folders you want to import.
Let's say you have the following sets of folders and sub-folders and
you want to add them to an existing RoboHelp project.

These folders may contain hundreds of files, graphics, sounds, and multimedia files. Below are a few scenarios when you may want to import files and folders into an existing RoboHelp HTML project.
You want to import all the files from a web site into RoboHelp. Note: you must have access to the folders from the web site and copy them to your local machine.
You have corrupt files and folders in a project and you can't go back to a previous version, so you want to move the non-corrupt folders into an existing project (this scenario was recently asked on the RoboHelp Community web site).
The following steps will help you accomplish this task. You should attempt this technique on a backup project:
First, you must run a DIR command at a Command prompt and save the output to a text file.
Open a Command
Prompt and navigate to the Root folder
you wish to import into another RoboHelp project.

Type: DIR
/b /s >files.txt and press Enter.
This command creates an output file containing a list of all files
in all sub folders. The output file is shown in Step 2 below. The text
file is saved to the current folder.

Edit the resulting text file to remove all absolute path information.
Open Windows Explorer.
Navigate
to the folder containing files.txt.

Open the text file in a word processor and remove all
the path information, so lines that look like:

...now read as:
Note that folders (lines without file extensions on the end) can be
deleted; you should also delete the file.txt output file from the list.

Be aware that files in the root folder of a RoboHelp project will contain
extensions such as .CHM, .MPJ, .HHP, .HHC, .HHK, .BRS, etc. These
files should be deleted from the list.
In addition, if a line does not end with an extension, it is a folder
and can be deleted.
Copy the path information created in the previous step and paste it into an existing HTML Help Project (.HHP) file.
Highlight and copy the new path information.
Open
a project HHP file in Notepad
and locate the [FILES] section.

Paste
the content into the [FILES] section either above,
or below the list of existing files.

Save and close the Project.HHP file.
Copy the folders and files you want to import to the RoboHelp project, and paste them into the RoboHelp project.
Open Windows Explorer and navigate to the folder you want to "import" into a RoboHelp project.
Copy all the files and folders that were included in the DIR command.
Paste them into the Project in the exact folder location as specified in the [FILES] section.
Open the project .HHP file in RoboHelp.
Open the .HHP file in RoboHelp.

Click No to rebuild the MPJ file.
If you experience broken
links, it is not the end of the world. In
fact, RoboHelp is doing you a big favor by identifying problems for you.
Take a
close look at image folders for files containing red Xs, as below.

Double click
any broken links and use the Edit command in the
Topic References dialog to resolve any broken
links you have. If you have links that go outside the folders you imported,
those links will most certainly will be broken.

You will have some clean-up work ahead, but the major task of moving the folders into the project is complete and can be accomplished in a short amount of time.