I have a powershell script that could be VERY crudely represented by the following.
function startTask
{
calls external batch script (runs for roughly 10 minutes)
creates done1.txt
}
function startTask2
{
calls batch (runs for roughly 10 minutes)
creates done2.txt
}
startTask
if done1.txt exists
startTask2
if done2.txt exists
write-host "done"
The issue I am facing is that immediately after calling the first batch file the 2nd batch file gets called. Is there a way to have powershell be aware of when the batch file is done? Side note, I don't have access to the batch file so I am unable to edit it
I have a powershell script that could be VERY crudely represented by the following.
function startTask
{
calls external batch script (runs for roughly 10 minutes)
creates done1.txt
}
function startTask2
{
calls batch (runs for roughly 10 minutes)
creates done2.txt
}
startTask
if done1.txt exists
startTask2
if done2.txt exists
write-host "done"
The issue I am facing is that immediately after calling the first batch file the 2nd batch file gets called. Is there a way to have powershell be aware of when the batch file is done? Side note, I don't have access to the batch file so I am unable to edit it
0 commentaires:
Enregistrer un commentaire