Solved

Loop directories at a specific dir

Posted on 2013-11-07
2
236 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 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