Save order data in a plain text file
Saving a file should be a fairly simple job with PHP. If you want to do it when an order is completed, you could make a conditional action for it, or use one of the hooks that's invoked when the order is completed.

If you have an concrete problems on how to do this, you should refine your question.

If you want to save the mail sent, this would hold the order info, you could create a custom module and use hook_mail_alter to get the mail text:

/**
 * Implements hook_mail_alter().
 */
function my_module_mail_alter(&amp;$message) {
  if ($message['id'] == 'uc_order_action-mail') {
    $message_text = $message['body'];
    // Code to save text as txt file here.
  }
}


By default the mail sent with ubercart is a HTML mail, so you might want to create your own text instead.

Whatever you do, you shouldn't alter Drupal or any of the modules, you should create your own module(s) that make the alteration. If you are new to Drupal development, you should read the developer guide.