AccuTermFileTransfer
From Pickwiki
Examples for file transfers with AccuTerm
This simple example uses the DosSvc program provided with AccuTerm. It allows you to easily transfer data to/from a PC without using ESCape sequences.
DosSvc will download the data in SEND.DATA to SEND.PATH\SEND.FILE, then it will execute CMD, then (assuming you have stored a file with results from CMD, it will upload back to MV the data at GET.PATH\GET.FILE.
Just modify the variables and run.
* CMD = DOS COMMAND TO EXECUTE * SEND.PATH = DOS DIRECTORY TO SEND SEND.DATA TO BEFORE CMD * SEND.FILE = DOS FILE NAME TO SEND SEND.DATA TO BEFORE CMD * SEND.DATA = DATA TO SEND TO SEND.FILE * GET.PATH = DOS DIRECTORY TO GET GET.DATA FROM AFTER CMD * GET.FILE = DOS FILE NAME TO GET GET.DATA FROM AFTER CMD * * OUTPUT: * GET.DATA = DATA RECEIVED FROM GET.FILE * SEND.PATH = "C:\TEMP\AT_TRANSFER" SEND.FILE = "TARGET.TXT" SEND.DATA = "This is the data to be sent to the PC" CMD = "DIR ":SEND.PATH:" > ": SEND.PATH :"\FILELIST.TXT" GET.PATH = SEND.PATH GET.FILE = "FILELIST.TXT" GET.DATA = "" * CALL DOSSVC(CMD, SEND.PATH, SEND.FILE, SEND.DATA, GET.PATH, GET.FILE, GET.DATA) CRT "File listing:" FOR ATB = 1 TO DCOUNT(GET.DATA,@AM) CRT GET.DATA<ATB> NEXT ATB