Page 1 of 1

To simulate XCOPY & DELTREE in JADE?

Posted: Fri Aug 07, 2009 12:06 pm
by ConvertFromOldNGs
by BevanClarke >> Wed, 13 Mar 2002 22:54:35 GMT

Anyone already written JADE code to copy an enttire directory/subdirectory structure (with all their files) from X to Y -- in my case from drive C: to drive Z:, which is a ZipDisk?

I need a back-up routine in addition to dbUtil to backup some non-JADE files (such as Word and Excel and .txt).

I thought of using Kernal32's fileCopy butthen I'd have to write a complicated tree-walking routine to traverse the directory structure.

I have tried the .create ExternalProcess (calling a DOS .CMD batch file) but it's very unfriendly for my non-tech users. And within that ..CMD option, if I do have to use it, I need a DELTREE command to erase the ZipDisk [FORMAT is too slow and verbose]. But DELTREE was dropped from Win2000!

Re: To simulate XCOPY & DELTREE in JADE?

Posted: Fri Aug 07, 2009 12:06 pm
by ConvertFromOldNGs
by MITCHELL1 >> Wed, 13 Mar 2002 23:17:55 GMT

Bevan

The attached JADE method does a directory copy using a CardSchema method CnKarmaCntrl::copyFile. This method uses an external method implemented in karma.dll which itself uses the CopyFileEx Windows API. If you have CardSchema you should be able to use this.

Regards

--
Richard W Mitchell
Senior Software Engineer
Systems Management Development Centre
Jade Software Corporation Ltd
mailto: rmitchell@jade.co.nz

JADE Group trading as a division of Aoraki Corporation Ltd.
Visit our web site at http://www.cardinal.co.nz and news.jadeworld.com

Re: To simulate XCOPY & DELTREE in JADE?

Posted: Fri Aug 07, 2009 12:06 pm
by ConvertFromOldNGs
by MITCHELL1 >> Wed, 13 Mar 2002 23:22:32 GMT

Supplementary to my prior post : if you have CardSchema then you could also refer to method CnDatabaseAdmin::copyFilesFromDirectory, which CardSchema uses during system backups.

--
Richard W Mitchell
Senior Software Engineer
Systems Management Development Centre
Jade Software Corporation Ltd
mailto: rmitchell@jade.co.nz

JADE Group trading as a division of Aoraki Corporation Ltd.
Visit our web site at http://www.cardinal.co.nz and news.jadeworld.com

Re: To simulate XCOPY & DELTREE in JADE?

Posted: Fri Aug 07, 2009 12:06 pm
by ConvertFromOldNGs
by allistar >> Thu, 21 Mar 2002 1:21:27 GMT

We do the same thing using an external .dll that recurses the
directory structure and copies files from source to destination,
creating the appropriate folders along the way. It's not too tricky to
do this is a C++ dll.

Regards,
Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer
Auckland, NEW ZEALAND

Greentree International,
Developer of Greentree Financial Software. ------------------------------------------------------------------