|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Going from A to ZI have to write a program that will list the contents of sub directories in a directory. These directories are for customer info. Layout like this N:\FrenchCustomers\A\Cust1 N:\FrenchCustomers\A\Cust2 to N:\FrenchCustomers\Z\Cust1 So FrenchCustomers, GermanCutomers etc will each have an A to Z subdirectory. My question is, whats the best way of stepping through these? Lets say I'm just doing French customers. FOLDER_NAME = "N:\FrenchCustomers\" For stLetter = "A" to "Z" For Each foundDirectory In My.Computer.FileSystem.GetDirectories(FOLDER_NAME & stLetter) Debug.Print(foundDirectory) Next Next stLetter Now, For stLetter = "A" to "Z" won't work. What should I do instead? I know I can it working by putting the letters in a table, but that seems wasteful. Whats the more efficient way? Thanks Vayse Vayse,
For CharCode As Integer = 65 To 90 FOLDER_NAME = "N:\FrenchCustomers\" & Chr(CharCode) & "\" etc Kerry Moorman Show quoteHide quote "Vayse" wrote: > Hi > I have to write a program that will list the contents of sub directories in > a directory. > These directories are for customer info. Layout like this > > N:\FrenchCustomers\A\Cust1 > N:\FrenchCustomers\A\Cust2 > to > N:\FrenchCustomers\Z\Cust1 > > So FrenchCustomers, GermanCutomers etc will each have an A to Z > subdirectory. > > My question is, whats the best way of stepping through these? Lets say I'm > just doing French customers. > > FOLDER_NAME = "N:\FrenchCustomers\" > For stLetter = "A" to "Z" > For Each foundDirectory In > My.Computer.FileSystem.GetDirectories(FOLDER_NAME & stLetter) > Debug.Print(foundDirectory) > Next > Next stLetter > > Now, For stLetter = "A" to "Z" won't work. > What should I do instead? I know I can it working by putting the letters in > a table, but that seems wasteful. > Whats the more efficient way? > > Thanks > Vayse > > >
How to change printer's physical print margins thru VB coding?
2 pieces of the same code doing different things Custom Attributes, Shared methods, Derived classes and reflection allowing just numeric value in my textbox How to validate Date entries. Placing a .lnk file on the desktop Wanted: Simple VB.NET "WEB" Application with an Access Database String translation How to save iamge in database? Positioning Other Applicaitons |
|||||||||||||||||||||||