Solved

Loop directories at a specific dir

Posted on 2013-11-07
2
234 Views
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?

78061
78062
78063
78064  <<< starting here
78065

etct
0
Comment
Question by:VBdotnet2005
2 Comments
 
LVL 13

Accepted Solution

by:
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

                Next
            Else
            End If
        Next
0
 

Author Closing Comment

by:VBdotnet2005
ID: 39630919
thank you
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 (http://www.ecb.europa.eu/stats/exch…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now