MPEiX Command Files
MPEiX Command files
- The Wildcards must be the standard HP e3000 MPEiX characters.
- The PC path names must be fully qualified.
- The type of transfer is ASCII or Binary and will be the same for all selected files.
Wildcard Download Command File
Below is an MPE/iX command file that allows for wild card file transfers from the HP e3000 to the PC. This can also be called from a logon UDC to allow file transfers without giving access to a colon (MPE) prompt.
option nolist errclear setvar type1 " " setvar curup chr(27) + "A" setvar cleardis chr(27) + "J" setvar dispoff chr(27) + "&w13F" setvar dispon chr(27) + "&w12F" echo Enter the files to be down loaded to the PC echo MPEix listf symbols (@,?,#) are supported. input hpfilename; prompt="HP files: " echo echo echo Enter the path for the directory on the P.C. to receive files input pcdir; prompt="the default path is c:\ :" echo Enter the type of file transfer (ASCII, BINARY) input type1;prompt="the default is ASCII: " echo echo if type1 = " " then setvar type1 "ASCII" endif if ups("!type1") = "ASCII" or & ups("!type1") = "BINARY" THEN setvar continue "Y" setvar TYPE chr(27) + "&oF" + "!type1" else setvar continue "N" echo ************************************************************* echo echo The type of transfer !type is incorrect command file aborted echo echo ************************************************************* endif listf !hpfilename,6 > mpcfile if !hpcierr <> 0 then echo ********************************************************** echo echo ZERO file found using argument !hpfilename echo command file will be terminated. echo echo ********************************************************** endif if "!continue" = "Y" and !hpcierr = 0 then setvar i,0 setvar eof,finfo("mpcfile","eof") if pcdir = "" then setvar pcdir "c:\" endif if rht("!pcdir",1) = "\" then setvar pcdir "!pcdir" else setvar pcdir "!pcdir" + "\" endif echo ************************************************************ echo echo !eof file(s) found using argument !hpfilename echo the file will be sent to directory !pcdir echo in !type1 format input answer;prompt="OK to continue (Y/N):" if ups("!answer") = "Y" then setvar receive chr(27) + "&oC " + "download " echo !dispoff while (i < eof) setvar i,!i + 1 print mpcfile;start=!i;end=!i > tmp2 input file1 < tmp2 setvar HOSTF chr(27) + "&oF " + "HOSTF " + rtrim("!file1") setvar x pos(".","!file1") setvar x,!x - 1 setvar LOCF chr(27) + "&oF " + "LOCF !pcdir" + lft("!file1",x) echo !TYPE echo !LOCF echo !HOSTF echo !receive input hprog !hprog input cc echo !curup!curup!curup!curup!curup!curup!curup endwhile echo !cleardis echo !curup!curup echo !dispon echo !curup!curup endif endif pause 1