Solved

Loop directories at a specific dir

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
C# code editing and collaboration 3 49
Data Saving 5 40
index Out OF Range Exception error 4 32
Close word object 13 24
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 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

14 Experts available now in Live!

Get 1:1 Help Now