Product's sort order in a category is by default determined by the position column in 'Category Products' tab in Manage Categories section.
I guess you need to bulk update the sort orders of the products per category. Assuming that you may need to write a php script, that can update the 'position' column in table 'catalog_category_product' in database using sql queries.
File can be kept at the root directory in your magento installation. Below code is just to give an idea, you need to modify/add/remove code in order to complete it as per your requirement and then hit the file from your browser.
<?php
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
umask(0);
Mage::app('admin');
Mage::register('isSecureArea', 1);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
set_time_limit(0);
ini_set('memory_limit','1024M');
/***************** UTILITY FUNCTIONS ********************/
function _getConnection($type = 'core_read'){
return Mage::getSingleton('core/resource')->getConnection($type);
}
function _getTableName($tableName){
return Mage::getSingleton('core/resource')->getTableName($tableName);
}
function _updatePosition($position, $categoryId, $productId){
$connection = _getConnection('core_write');
$sql = "UPDATE " . _getTableName('catalog_category_product') . " ccp
SET ccp.position = ?
WHERE ccp.category_id = ?
AND ccp.product_id = ?";
$connection->query($sql, array($position, $categoryId, $productId));
}
hope this help !