Click here to Skip to main content
15,913,722 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to display files that are not in directory? Pin
Luc Pattyn2-Jan-09 17:30
sitebuilderLuc Pattyn2-Jan-09 17:30 
GeneralRe: how to display files that are not in directory? Pin
zaimah2-Jan-09 19:23
zaimah2-Jan-09 19:23 
GeneralRe: how to display files that are not in directory? Pin
Luc Pattyn3-Jan-09 1:40
sitebuilderLuc Pattyn3-Jan-09 1:40 
GeneralRe: how to display files that are not in directory? Pin
zaimah3-Jan-09 20:43
zaimah3-Jan-09 20:43 
GeneralRe: how to display files that are not in directory? Pin
Luc Pattyn4-Jan-09 0:39
sitebuilderLuc Pattyn4-Jan-09 0:39 
GeneralRe: how to display files that are not in directory? Pin
zaimah4-Jan-09 2:39
zaimah4-Jan-09 2:39 
GeneralRe: how to display files that are not in directory? Pin
Luc Pattyn4-Jan-09 6:03
sitebuilderLuc Pattyn4-Jan-09 6:03 
QuestionRe: how to display files that are not in directory? Pin
zaimah8-Jan-09 20:31
zaimah8-Jan-09 20:31 
I manage to correct my coding... but there's another problems appear... two main directories that is dirA and dirB.. dirA have 3 folders and it is the main source.. must compare with dirB.. where if in dirA hv folder name ASB01,BP001 and CP001. And each of the folder hv files. I have to compare dirA with dirB where it suppose to display which folder and files in dirA are not in dirB. But when i did this coding, it only compare the first folder, and display the files that are not in dirB. When it comes to the next folder, it didnt compare, it display all the files in dirA. Example if dirA have folder ASB01 with files C4001, C4002 and folder BP001. Meanwhile dirB have folder ASB01 with files C4001 only. It will display ASB001/C4002, and all the files and other folder than ASB001. Iv been trying to find the problems.. Frown | :(

Try
            Dim dA1, dB1 As DirectoryInfo
            Dim dirA2 As FileSystemInfo() = dirA1.GetDirectories
            Dim dirB2 As FileSystemInfo() = dirB1.GetDirectories
            
            For Each dA1 In dirA2
                For Each dB1 In dirB2

                   If dA1.Name = dB1.Name Then

                   Dim dA2, dB2 As FileSystemInfo
                   Dim dirA3 As FileSystemInfo() = dA1.GetFileSystemInfos
                   Dim dirB3 As FileSystemInfo() = dB1.GetFileSystemInfos
                        
                        For Each dA2 In dirA3
                            For Each dB2 In dirB3

                              If dA2.Name = dB2.Name Then
                              Else
                                ListBox1.Items.Add(dA2.FullName)
                              End If
                            Next dB2
                        Next dA2

                   Else
                        
                    ListBox1.Items.Add(dA2.FullName)

                   End If
                 Next dB1
            Next dA1
            Catch ex As Exception

            MsgBox(ex.Message)

        End Try

    End Sub

AnswerRe: how to display files that are not in directory? Pin
Luc Pattyn9-Jan-09 1:21
sitebuilderLuc Pattyn9-Jan-09 1:21 
GeneralRe: how to display files that are not in directory? Pin
zaimah11-Jan-09 14:35
zaimah11-Jan-09 14:35 
GeneralRe: how to display files that are not in directory? Pin
Luc Pattyn11-Jan-09 15:22
sitebuilderLuc Pattyn11-Jan-09 15:22 
GeneralRe: how to display files that are not in directory? Pin
zaimah11-Jan-09 16:14
zaimah11-Jan-09 16:14 
GeneralRe: how to display files that are not in directory? Pin
Luc Pattyn11-Jan-09 16:45
sitebuilderLuc Pattyn11-Jan-09 16:45 
GeneralRe: how to display files that are not in directory? Pin
zaimah11-Jan-09 17:26
zaimah11-Jan-09 17:26 
GeneralRe: how to display files that are not in directory? Pin
Luc Pattyn11-Jan-09 18:32
sitebuilderLuc Pattyn11-Jan-09 18:32 
GeneralRe: how to display files that are not in directory? Pin
zaimah11-Jan-09 21:14
zaimah11-Jan-09 21:14 
GeneralRe: how to display files that are not in directory? Pin
Luc Pattyn12-Jan-09 2:24
sitebuilderLuc Pattyn12-Jan-09 2:24 
QuestionRetrieve last ID from SQl server Pin
Jodd2-Jan-09 13:15
Jodd2-Jan-09 13:15 
AnswerRe: Retrieve last ID from SQl server Pin
Mycroft Holmes2-Jan-09 15:35
professionalMycroft Holmes2-Jan-09 15:35 
AnswerRe: Retrieve last ID from SQl server Pin
N a v a n e e t h2-Jan-09 15:51
N a v a n e e t h2-Jan-09 15:51 
AnswerRe: Retrieve last ID from SQl server Pin
TheComputerMan3-Jan-09 4:44
TheComputerMan3-Jan-09 4:44 
AnswerRe: Retrieve last ID from SQl server Pin
TheComputerMan3-Jan-09 4:49
TheComputerMan3-Jan-09 4:49 
QuestionLost Feature in VB Pin
udatl2-Jan-09 10:57
udatl2-Jan-09 10:57 
AnswerRe: Lost Feature in VB Pin
Fabio V Silva2-Jan-09 12:04
Fabio V Silva2-Jan-09 12:04 
GeneralRe: Lost Feature in VB Pin
udatl2-Jan-09 16:25
udatl2-Jan-09 16:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.