Monday, March 26, 2012

Loop Question

Hi everyone!

After many hours of pulling my hair out ive decided to ask this question on this forum.Im pretty new to VB.NET and cannot seem to get my head around a certain function that i need 2 program

Here goes...I need to loop through a number of files within a folder,six of these files are related to each other and the folder contains hundreds of these set if sixes.This grouping is evident in a certain number contained within the filename which is common to each in a group.

For Each fiTemp In fi

Next fiTemp

My problem is finding a way to say basically,for each fiTemp in fi where these six files are related to each other...carry out some task(have no problem coding this part) with each of these files and then move on to the next set.

Thanks for your help!!Can you specify how this six are related? Is there some patern in file name?
yes there the number 1 is somewhere in each of six filenames,then the next six have the number 2 etc

My problem is that im using the html text from each of a set of six documents,taking a substring out of each of these texts and then inserting this info into a row of the database pertaining to that number.My problem is getting all of these to insert into this row at once.The text id of the table is based on autonumber.
Not sure I understood, but try this:
Directory.GetFiles(YourPath, "filename1*.*")

0 comments:

Post a Comment