vb.net - How to loop a file check until conditions are met in Visual studio 2017 with vb code? -


so i'm trying loop file check until 1 file there , file creates file gone. keep trying rewrite , have been trying find working setup can't find code have currently

dim dir = my.application.info.directorypath     if progressbar1.value = 25                     if checkbox1.checked                 if fileexists(dir + "\download\downloaded.mp3")                     if fileexists(dir + "\download\downloaded.mkv")                     else                         progressbar1.value = 45                         exit                     end if                 end if             end if             if fileexists(dir + "\download\dvid.mp4")                 if fileexists(dir + "\download\dvid.mp4.part")                 else                     progressbar1.value = 45                     exit                 end if             end if         loop 

when ever application run code app stops responding doing wrong or there missing?

using wait exit on process fixed problem

dim p new process         dim psi new processstartinfo(dir + "file start.exe")         psi.windowstyle = processwindowstyle.hidden         psi.arguments = "-x --audio-format mp3 --output /downloaded/downloaded.mkv " + form1.textbox1.text         p.startinfo = psi         p.start()         p.waitforexit() 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -