home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 3840
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 7785
- LinkTopic = "Form1"
- ScaleHeight = 3840
- ScaleWidth = 7785
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command1
- Caption = "Scan Now"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 5955
- TabIndex = 3
- Top = 2970
- Width = 1575
- End
- Begin VB.FileListBox File1
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 3240
- Left = 2955
- TabIndex = 2
- Top = 255
- Width = 2715
- End
- Begin VB.DirListBox Dir1
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 2670
- Left = 300
- TabIndex = 1
- Top = 825
- Width = 2520
- End
- Begin VB.DriveListBox Drive1
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- Left = 285
- TabIndex = 0
- Top = 270
- Width = 2520
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim InitialFolder
- Dim totalFiles As Integer
- Private Sub Command1_Click()
- ChDrive Drive1.Drive
- ChDir Dir1.Path
- InitialFolder = CurDir
- ScanFolders
- MsgBox "There are " & totalFiles & " under the " & InitialFolder & " folder"
- End Sub
- Sub ScanFolders()
- Dim subFolders As Integer
- totalFiles = totalFiles + File1.ListCount
- subFolders = Dir1.ListCount
- If subFolders > 0 Then
- For i = 0 To subFolders - 1
- ChDir Dir1.List(i)
- Dir1.Path = Dir1.List(i)
- File1.Path = Dir1.List(i)
- Form1.Refresh
- ScanFolders
- Next
- End If
- File1.Path = Dir1.Path
- MoveUp
- End Sub
- Sub MoveUp()
- If Dir1.List(-1) <> InitialFolder Then
- ChDir Dir1.List(-2)
- Dir1.Path = Dir1.List(-2)
- End If
- End Sub
- Private Sub Dir1_Change()
- ChDir Dir1.Path
- File1.Path = Dir1.Path
- End Sub
- Private Sub Drive1_Change()
- ChDrive Dir1.Path
- Dir1.Path = Drive1.Drive
- Dir1.Refresh
- End Sub
- Private Sub Form_Load()
- ChDrive App.Path
- ChDir App.Path
- End Sub
-