[AccessD] Shelling to dos

MartyConnelly martyconnelly at shaw.ca
Fri Feb 3 23:49:12 CST 2006


The Shell process flails around on its own,
If you need to know when the process ends
 
http://vbnet.mvps.org/code/faq/getexitcprocess.htm

 get a return code if it sends one from ShellEx
Shamil had a couple of posts on this about 2 or 3 months back

If the Shell function successfully executes the named file, it returns 
the task ID of the started program. The task ID is a unique number that 
identifies the running program. If the Shell function can't start the 
named program, an error occurs.

Note   The Shell function runs other programs asynchronously. This means 
that a program started with Shell might not finish executing before the 
statements following the Shell function are executed.





John Colby wrote:

>Does a shell to dos run in its own thread, i.e. will the shell command
>return instantly, leaving the Dos process running?
>
>I need to Xcopy a directory from here to there.  Rather than doing that from
>inside of Access and tying up my program, I thought I would run a batch file
>that does an Xcopy with a ton of switches that copies subdirs, sets the
>archive bit etc.  This only really helps if the shell returns once it gets
>the xcopy running, but Xcopy must continue to run after the shell command
>returns.
>
>John W. Colby
>www.ColbyConsulting.com 
>
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada






More information about the AccessD mailing list