Link to home
Start Free TrialLog in
Avatar of gabi456
gabi456

asked on

Batch file not closing after executing

Hello

I am trying to run a simple batch code but it is not closing after executing.

Have tried the following, but none of them close

'------------------------------------------
COPY C:\NATIVGRP\NATIV14.accdb C:\LAST\NATIV14.accdb /y
C:\NATIVGRP\NATIV14.accdb
'------------------------------------------
OR
'------------------------------------------
COPY C:\NATIVGRP\NATIV14.accdb C:\LAST\NATIV14.accdb /y
C:\NATIVGRP\NATIV14.accdb
EXIT
'------------------------------------------
OR
'------------------------------------------
COPY C:\NATIVGRP\NATIV14.accdb C:\LAST\NATIV14.accdb /y
CALL "C:\NATIVGRP\NATIV14.accdb"
EXIT


Thanks.
Avatar of dirkvdo
dirkvdo
Flag of Belgium image

How big is the nativ14.accdb file ?

Try putting a PAUSE command between the first and the second line, lauch the batchfile and wait long enough before you press enter at the pause (to allow the copy to finish, as I believe that is the problem)and see if it exits correctly. If it does, you should insert a loop that checks the existence of the copied file before running it.

Regards,

Dirk
SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gabi456
gabi456

ASKER

Thanks for replying.

It actually does finishing copying only the command promt window does not close.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gabi456

ASKER

Thanks man.
I suggest in future you look towards the "A" grade button if possible.  We are only rewarded here by points and grades.

Steve