Re: NewEra: How to copy a file ?
Posted in 1997
Jens Ebert wrote: > > Hi, > > the ixFile class does not provide a method to copy a file to another location. > How can this be done without using the DOS call from within a RUN statement? Here's a "pure NewEra" way: INCLUDE SYSTEM "ix4gl.4gh" INCLUDE SYSTEM "ixtext.4gh" INCLUDE SYSTEM "ixfile.4gh" MAIN VARIABLE theText ixText VARIABLE theFile ixFile DISPLAY "ixText autoexec.bat" LET theText = NEW ixText( locType: ixBlob::locInFile, file: "C:\\\\autoexec.bat" ) DISPLAY "ixFile autonew.out" LET theFile = NEW ixFile( fileName: "C:\\\\autonew.out", openMode: ixFile::create + ixFile::readWrite ) DISPLAY "ixFile::writeBlob" CALL theFile.writeBlob( blb: theText ) DISPLAY "ixFile::flush" CALL theFile.flush( ) DISPLAY "Done" RETURN END MAIN This of course could be incorporated into you own home-grown class derived from ixFile. -- //////////////// ======================================================= ////////// // Dennis J. Pimple Informix Software, Inc. ////// / /// Principal Consultant 6300 S Syracuse Way Ste 205 ///// // //// dennisp@informix.com Englewood CO 80111 //// // ///// /// // ////// recept: 303-850-0210 // // /////// direct: 303-740-5611 Opinions expressed are mine, / /////////// fax: 303-779-4025 and do not necessarily //////////////// http://www.informix.com reflect those of my employer