vb.net - Verifying Files In A Folder Based On Line Count -
ok, i'm trying figure best way verify contents of folder based on count via listbox. let me further explain.
here current code count number of pdfs in 2 different locations , total them grand total.
'counts test1 pdfs dim f string, c long f = dir$("\\test1\pdfs\*.pdf") while len(f) <> 0 c = c + 1 f = dir$() loop 'counts test2 pdfs dim n string, d long n = dir$("\\test2\pdfs\*.pdf") while len(f) <> 0 d = d + 1 n = dir$() loop gtotalpdfs = c + d here current code count files i've selected in listbox.
'adds temp1 files dim sum1 double each item string in me.listbox6.items sum1 += double.parse(item) next 'adds temp2 files dim sum2 double each item string in me.listbox7.items sum2 += double.parse(item) next 'adds temp3 files dim sum3 double each item string in me.listbox8.items sum3 += double.parse(item) next 'adds files grand total gtotal = sum1 + sum2 + sum3 i have process before create pdf's based on files listed in listbox.
what having trouble verifying pdfs created in test1 , test2 folders equal counts listboxes. count needs match before running next process. i'm kind looking wait or loop until both counts match, again before running next process.
any suggestions?
imports system.io dim pdffilecount integer = 0 dim listboxcount integer = 0 while not (pdffilecount > 0 , pdffilecount = listboxcount) pdffilecount = directory.getfiles("\\test1\pdfs", "*.pdf").count + _ directory.getfiles("\\test2\pdfs", "*.pdf").count listboxcount = listbox6.selecteditems.count + listbox7.selecteditems.count + _ listbox8.selecteditems.count application.doevents() end while
Comments
Post a Comment