Depending on the number of files you should probably use the LoadFromFiles tool. Look for the "Windchill Data Loading Reference and Best Practice Guide". I'm currently working on exactly this where I'm creating a small tool to extract info from a legacy database and build the load files for both the Parts, Documents and Part to Document Links.
Jorn