Copy files using shellExecute or node.createExternalProcess

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Copy files using shellExecute or node.createExternalProcess

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:28 pm

by Paul Mathews >> Thu, 10 Aug 2000 10:54:07 GMT

Have not been able to find the correct syntax to copy fileA to fileB using shellExecute or createExternalProcess.

If you know could you please post the correct syntax.

Using a batch or command file is not a correct answer as that needs to
be installed on every thin client.

Paul Mathews
pem@cmsystemsgroup.com.au
Phone: [612] (99717384) Fax[612] (99711679)
(Dee Why,Sydney,Australia)

Please visit our homepage cmsystemsgroup.com.au.

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

Re: Copy files using shellExecute or node.createExternalProcess

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:28 pm

by Evan Thwaites >> Fri, 11 Aug 2000 4:19:09 GMT

Paul,
The following approach has worked for me -

Create an external function under the kernel32 library as follows:

copyFile(inFile:String;
outFile:String;
exists:Boolean):Boolean is CopyFileA in kernel32;

This can then be called from within a Jade method. The inFile and outFile parameters are the source and destination file respectively (including the path). The exists parameter allows for overwriting an existing file. The success of the copy is indicated by the returned boolean value.

Hope this covers what you want to do.

Evan Thwaites
Southcom Ltd.
evan.thwaites@southcom.co.nz
Ph. (03) 214-4184
Fax (03) 214-4410

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

Re: Copy files using shellExecute or node.createExternalProcess

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:28 pm

by Craig Shearer >> Mon, 14 Aug 2000 19:56:17 GMT

and if you're using this in a thin client environment you'd want to define the function as "presentationClientExecution" otherwise you'll be copying files on the app server machine.

Craig.

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

Re: Copy files using shellExecute or node.createExternalProcess

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:28 pm

by Richard Mitchell >> Wed, 23 Aug 2000 23:22:51 GMT

Craig

I believe that presentationClientExecution is the default for external functions. You need to specify applicationServerExecution if you want the function to execute on the app server.

Richard


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 24 guests