Command line does not wait for exe to complete

I converted my matlab program to a standalone exe. When I call exe from the command line, it does not wait until exe is executed. The program takes about 20-30 seconds to run. The program basically creates a txt file. How can I make it wait for exe to complete. My main matlab function

function []=features(img_path,category,output_path) if (strcmp('shoe',category)== 1) if exist(img_path,'file') test_shoes(img_path,output_path); else disp ('Input image path does not exist'); end else disp('Sorry wrong input for category.Please give shoe/dress/handbag'); end return; 

The problem is shown in the following screenshot:

โ€œAll warnings have the stateโ€œ off. โ€Actually exe from MATLAB afer is displayed for 5 seconds, but the terminal does not wait until exe finishes executing ie" E: \ test> "is already shown in the next line immediately after calling exe.

How can I make the command line wait for exe os to finish so that the new command line does not appear until it is finished?

+6
source share
1 answer

You can try running it as follows:

START / WAIT MyProgramm.exe

look at here:

how-do-you-wait-for-an-exe-to-complete-in-batch-file

+22
source

Source: https://habr.com/ru/post/952730/


All Articles