So let me make sure I understand your application first.
You have a motor controller connected via serial or GPIB and you need to send an ASCII file to the controller which tells the controller how to operate. It then receives ASCII commands via serial/GPIB again and uses the file to decipher what to do. If this is incorrect, please clarify, if I am correct, then you would do the following.
Since the IO Assistant only understand how to send ASCII characters (since that is all serial knows), you would have to send the file by first openning the file and reading the characters to send. From your post, it sounds like you have figured this out. As far as telling your controller to download the ascii, this must be a command that you must send to your instrument. All you send is ASCII characters and the instrument should understand them as some sort of command telling it to download.
As far as the keystrokes, you can do this by calling the user32.dll located in C:/windows/system32. I believe the correct function is keybd_event. For more information on this, please refer to Microsoft's MSDN website.
Brandon Vasquez
Applications Engineer
National Instruments