LPARAMETERS tiBusLocID as Integer,tlAndWait as Boolean IF VARTYPE(tiBusLocID )="L" tiBusLocID =2 ENDIF #DEFINE CL_STORE ["C:\Program Files\Symantec\pcAnywhere\awrem32.exe" ] CLOSE DATABASES ALL lcStoreAW=[ "C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\Store]+TRANSFORM(tiBusLocID)+[_ToHQ.CHF"] lccommandline = ["C:\Program Files\Symantec\pcAnywhere\awrem32.exe" "C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\Store2_ToHQ.CHF"] *lcCommandLine = CL_STORE + lcStoreAW ox=NEWOBJECT( "api_apprun", "modules\process", "", lcCommandLine) IF tlAndWait ox.LaunchAppAndWait() ELSE ox.LaunchApp() ENDIF ox=nulland the portion calling this routine:
IF TransferFromStore(liStoreID) ** transfer went OK ** delete the xfer tables DELETE FILE ("ToHQ\SO_hq.dbf") DELETE FILE ("ToHQ\SO_hq.fpt") DELETE FILE ("ToHQ\SOITEM_hq.dbf") DELETE FILE ("ToHQ\FINXN_hq.dbf") DELETE FILE ("ToHQ\CDRAWER_hq.dbf") DELETE FILE ("ToHQ\CDRAWER_hq.fpt") DELETE FILE ("ToHQ\CCheck_hq.dbf") DELETE FILE ("ToHQ\INVOICE_hq.dbf") DELETE FILE ("ToHQ\audit_hq.dbf") DELETE FILE ("ToHQ\audit_hq.fpt") ELSE MESSAGEBOX(MESSAGE_BAD_TRANSFER,4096+48,"Transfer Error",10000) ENDIFANd the problem is if I just let AW run without the wait It is still connecting while VFP is already deleting the files.