AccuTermFileTransfer: Difference between revisions
From Pickwiki
Jump to navigationJump to search
New page |
m link fix |
||
Line 1: | Line 1: | ||
= Examples for file transfers with [http://www.asent.com AccuTerm] = | = Examples for file transfers with [http://www.asent.com [[AccuTerm]]] = | ||
This simple example uses the <nowiki>DosSvc</nowiki> program provided with <nowiki>AccuTerm</nowiki>. It allows you to easily transfer data to/from a PC without using ESCape sequences. | This simple example uses the <nowiki>DosSvc</nowiki> program provided with <nowiki>AccuTerm</nowiki>. It allows you to easily transfer data to/from a PC without using ESCape sequences. | ||
Line 18: | Line 18: | ||
* GET.DATA = DATA RECEIVED FROM GET.FILE | * GET.DATA = DATA RECEIVED FROM GET.FILE | ||
* | * | ||
SEND.PATH = "C:\TEMP\AT_TRANSFER" | SEND.PATH = "C:\TEMP\[[AT_TRANSFER]]" | ||
SEND.FILE = "TARGET.TXT" | SEND.FILE = "TARGET.TXT" | ||
SEND.DATA = "This is the data to be sent to the PC" | SEND.DATA = "This is the data to be sent to the PC" |
Latest revision as of 23:48, 26 February 2015
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