I would like to know how can I run a .cmd file from Powershell and wait until finish to continue with my script:
$DBReindex = "C:\Program Files\P-Synch\default\cgi-bin\Database Reindex Script.CMD"
$process = [System.Diagnostics.Process]::Start("cmd /c $DBReindex")
This is the content of my .cmd file
echo DB Reindex in progress...
for /F %%i in (dblist.txt) do ..\util\dbop -pack %%i >> packresult.txt
for /F %%i in (dblist.txt) do ..\util\dbop -reindex %%i >> reindexresult.txt
echo Result is ready.Thank you very much.
Thanks in advance,