To simulate XCOPY & DELTREE in JADE?

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

To simulate XCOPY & DELTREE in JADE?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:06 pm

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!

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: To simulate XCOPY & DELTREE in JADE?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:06 pm

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
Attachments
2163_1.mth
(1.52 KiB) Downloaded 121 times
Last edited by ConvertFromOldNGs on Wed Aug 12, 2009 10:10 am, edited 2 times in total.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: To simulate XCOPY & DELTREE in JADE?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:06 pm

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
Last edited by ConvertFromOldNGs on Wed Aug 12, 2009 10:10 am, edited 1 time in total.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: To simulate XCOPY & DELTREE in JADE?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:06 pm

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. ------------------------------------------------------------------


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 16 guests

cron