Note: I am currently using Standalone tes3cmd.exe 0.37v (for Windows), tes3cmd-0.37v-2013.10.06.7z from MLOX Download page
This is some information culled from a TesPCD thread over on the official forums: Q: Cleaning Mods with TESPCD
Original post by Pinkertonius
Pinkertonius, on 30 Apr 2011 - 4:50 PM, said:
I highly recommend using Tes3cmd, it will do a really through job of cleaning away the duplicate entries (and some other stuff).
Here's a little how-to threw together quickly a while back.
TESPCD is good as a diagnotic tool but I don't directly clean with it . Also, I don't believe it updates the record count in mods that it edits. And I advise against using it to delete any dialogue. It doesn't "see" the PNAM and NNAM entries the surround the info entries.
Notes about this:
First, make sure the mod master dependencies are already located in the "\Data Files" folder, or THE MOD WILL NOT BE CLEANED !!
TO RUN...
Drag ESP/M files onto the shortcut or .bat file to clean mods.
CLEANING ORDER of mods...
1. Mod masters (e.g. GIANTS.esm, etc.)
2. Mod plugins that are a Master to another Plugin
3. Mod plugins relying on Official Masters, Mod Masters, or Plugin Masters
4. All other plugins without master dependencies
DO NOT CLEAN MOD "CONTROL FILES" ...
Files such as "GIANTS Ultimate Control File.esp" intentionally contain records duplicated from their mod master, and should not be cleaned.
tes3cmd.exe AND the batch file (whatever you name it, I named mine tes3cmd clean.bat) MUST be in the Data Files directory. However, the esp itself do not need to be in the Data Files directory. I have successfully cleaned esps in folders on my desktop (as long as all Master Files ARE in Data Files so Tes3cmd can find them).
The above batch file example leaves the old espname.esp and a new clean_espname.esp in the data files directory (or whatever directory you started from) along with the log file. For myself I prefer to have it go ahead and move the old esp to the Data Files\tes3cmd\backups directory. So my batch file looks like this:
- Code: Select all
@echo off
rem drag and dropable bat file
rem put shortcut on desktop and drag esp onto it
rem the cleaned file with original name will be in Data Files with log file
rem (assuming that is where you started from).
rem the original will be in Data Files\tes3cmd\backups directory
tes3cmd clean --replace --hide-backups %1 > %1-cleaned.log 2>&1
rem Output results of tes3cmd cleaning to CMD window ...
rem Outputting results to file via "> %1-cleaned.log 2>&1" as above will not print to screen
rem without explicitly using 'type' command below ...
type %1-cleaned.log
pause
This version of the batch file does not synchronize the mod header to the esm files the mod depends on, so it may be yellow in Wrye Mash and give an in-game error until you fix it in Wrye Mash OR run Tes3cmd like this:
tes3cmd header --synchronize "my plugin.esp"
If you don't want it to pause in the dos window when it finishes, delete the pause
If you don't want it to write a log delete "> %1-cleaned.log 2>&1"
It can take quite a while for Tes3cmd to finish if the plugin is very large....BE PATIENT (one of my grass mods took 20 minutes and I have a fairly decent computer)
I will note that it is possible to make other types of drag and drop Tes3cmd batch files as well as this cleaning one by using different Tes3cmd switches from the Tes3cmd Wiki
IF you wish to clean Tribunal.esm and Bloodmoon.esm, DO NOT USE THIS BATCH FILE!!! Use the fancy version down below. It has special switch settings in it to leave the needed GMSTs alone. Do not ever touch Morrowind.esm
I hope others find this information useful.