Re: Nuevo ADORDD
Posted: Sat Jun 20, 2015 3:38 pm
Johnson,
Solo necesitas :
Solo necesitas :
- Code: Select all Expand view
Function upload( cBaseDir, cPrefix, cDriver, cRDD )
LOCAL aFiles, aStruct, aFile, cFile, aTemp
LOCAL nCanArc := 0, nConArc := 0
/* upload files */
aFiles := directory( cBaseDir + "*.dat" ) // dejar en minuscula
nCanArc := len(aFiles)
For each aFile in aFiles
IF SELECT("ORIG") <> 0
CLOSE ORIG
ENDIF
IF !lUsaTab( cBaseDir ,aFile[ F_NAME ],"ORIG",{},.T.,NIL,cDriver)
mymen("Error. Tabla")
return
endif
//? " Uploading...", cFile, "(" + alltrim(str(ORIG->( lastrec() ) ) ), "records)"
copy to aFile[ F_NAME ] VIA "ADORDD"
// INDICES LOS PONES EN UNO ARRAY LEEME.PDF /README.PDF GITHUB.
++nConArc
Next
Return