The best way to do that is to do a Category Import.
A category import will add, or update your Category structure.
Here is what a Category CSV file looks like:
You can manually create this file, or you can do an export of some already created categories. Click here to see how to do that.
In the first column you have the Category Name (the "/" creates or refers to a Sub-Category)
When all of the data is entered into the file, click "File", "Save as" and name your file and choose "(CSV)Comma Delimited" as the file type
Once you have your file ready to import you can go to the "Import Category" area in your E-Commerce Module:
Then Click on "Browse" to upload the CSV file you just created. Select the file from the stored location on your Hard drive, then leave the "Field Delimiter" to "Comma" and the "Character Set" to "Windows-1252". Then click "Parse first line"
once that is done you will see a screen that looks like this:
Be sure the fields match up. Where is says "Name" on the left, be sure the drop down is the field you want to use for the Category Name and so on.
Next you want to choose the "Import Mode".
Add will add any new Categories that do not already exist. (NOTE if your file has categories listed that already exist the import will just skip those and generate an error at the end stating the field already exists)
"Update" will update any of your existing Categories with new information in the file for those categories listed.(NOTE: If your file has new categories that are not already created in your Categories area, UPDATE will not create them and will generate an error upon completion stating that the category does not exist)
"Delete" will delete the items specified in your CSV File.
Under "Import Mode" you have the option to "delete all Categories before import"
And you do want to select "Don't import First Line of File". Because the first line is the Header of the file.