| 1. |
Solve : Wait - pause command issue? |
|
Answer» Hi Well like I said I am no expert, i got some of this to work by doing the following. Did you really use the part in bold? Like that? You should do this start /wait c:\first.bat Quote however it leaves 2 dos windows up at the same time Put this as a last (second) line of each batch file Code: [Select]exitQuote copy w:\test1.mdb c:\test\test1.mdb Quote the problem I have is that the batch runs to the end before the first process is finished I don't understand how this is possible. The command shell is not multi-threaded and can only process one command at a time. If you insist on using the start command with the /wait SWITCH, try adding the /b switch to keep all the processing in the same window. Multiple windows only adds to the confusion. I did wonder if the command processor might return after starting a COPY operation from a networked drive to another, that is to say, the copy is DONE asynchronously? If not, I share your confusion. I note that the OP has not stated the local OS nor the server or other machines OSs. Many thanks for the response's - its working by keeping it simple First.bat Code: [Select]copy w:\test1\test1.txt c:\test2\test1.txt exitSecond.bat Code: [Select]copy w:\test1\test2.txt c:\test2\test2.txt exitExecute.bat Code: [Select]start c:\test1\first.bat start c:\test1\second.bat W is the mapped drive In answer to some of the other points - I am using Vista mapped to an XP machine across a local wireless network (all set up throught standard windows controls, with a standard network). The /wait command was just confusing matters - i placed it wrong a few times and had all kind of errors. The /b switch - didnt even go down this road ALTHOUGH made a note of that one for the future. Question now is can I do this without having to create differrent bat files for every file/folder I want to copy? But again thanks I can now get my back ups done |
|