Loop directories at a specific dir

Posted on 2013-11-07
Last Modified: 2013-11-07
I need to loop through  a directory called "SENT" and its directories below (number only).  However, I want to start looping at 78064 and after. What should I do?

78064  <<< starting here

Question by:VBdotnet2005
LVL 13

Accepted Solution

Jesus Rodriguez earned 500 total points
ID: 39630912
Dim ListOfDirectories As String() = System.IO.Directory.GetDirectories("C:\SENT")
        For Each StrDir As String In ListOfDirectories
            If CInt(StrDir) >= 78064 Then
                'Do  your process
                Dim ListOfFiles As String() = System.IO.Directory.GetFiles(StrDir)
                For Each File As String In ListOfFiles
                    'Do What you want with your file

            End If

Author Closing Comment

ID: 39630919
thank you

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Gridview selected row 9 47
SqlDataBase 7 48
How to open form using item in Listbox. 8 21
VB.NET 2008 - SQL Timeout 9 25
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question