0.9b (c) 1995 Peter Childs
Performs a remote file move on a server.
Syntax
MyRc = NetMisc(NETREMOTEMOVE, SrcPath, DestPath, 'VarInfo')
Parameters
The parameters required and returned are:
SrcPath The redirected source path
DestPath The redirected destination path
'VarInfo' which is divided into:
o VarInfo.openflags
Controls the file open. The file open options are defined as follows:
Bit Meaning --- ------- 0-1 Used if destpath exists. If 0, the open fails; if 1, the file is appended; and if 2, the file is overwritten. 2-3 Reserved, with a value of 0. 4 Used if destpath does not exist. If 0, the open fails; if 1, the file is created. 5-15 Reserved, with a value of 0.
The value must be converted to decimal before the function call. The default value is 0x0012 which is equal to 18 in decimal
o VarInfo.moveflags
Controls the move options, expressed in decimal.
File move options defined as follows:
Bit Meaning --- ------- 0 If 1, destpath must be a file, and bit 1 must be 0. 1 If 1, destpath must be a directory, and bit 0 must be 0. 2-15 Reserved; the value of these bits must be 0.
The value must be converted to decimal before the function call. The default value is 0x0002 which is equal to 2 in decimal
o VarInfo.mi_num_moved
The number of files moved
o VarInfo.mi_err_buf
The string buffer containing error information of the move operation
Example
/* Some */ /* Perform Net remote move */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETREMOTEMOVE = 690 SrvName = '\\KING_BALU' SrcPath = 'Y:\CONFIG.ORG' DestPath = 'Y:\OS2' VarInfo.openflags = x2d('0012') VarInfo.moveflags = x2d('0002') myRc = NetMisc(NETREMOTEMOVE, SrcPath, DestPath, 'VarInfo') if myRc <> '0' then do say 'Got error from NetMisc() ' myRc rcCode = 9 end else do say 'Number files moved ' VarInfo.mi_num_moved say 'Error Information ' VarInfo.mi_err_buf rcCode = 0 end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit rcCode
Example Output
/* some */ Number files moved 1 Error Information
Inf-HTML End Run - Successful