VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4695
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   4695
   ScaleWidth      =   4680
   StartUpPosition =   3  '´°¿ÚÈ±Ê¡
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   375
      Left            =   2220
      TabIndex        =   4
      Top             =   420
      Width           =   2295
   End
   Begin VB.DirListBox Dir1 
      Height          =   1350
      Left            =   60
      TabIndex        =   3
      Top             =   420
      Width           =   2055
   End
   Begin VB.TextBox Text2 
      Height          =   330
      Left            =   2220
      TabIndex        =   2
      Text            =   "Text2"
      Top             =   60
      Width           =   2295
   End
   Begin VB.TextBox Text1 
      Height          =   315
      Left            =   60
      TabIndex        =   1
      Text            =   "Text1"
      Top             =   60
      Width           =   1995
   End
   Begin VB.FileListBox File1 
      Height          =   2790
      Hidden          =   -1  'True
      Left            =   60
      TabIndex        =   0
      Top             =   1800
      Width           =   2055
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
    Dim i&, sFile$, sFileNew$
    For i = 0 To File1.ListCount - 1
        sFile$ = CTools.GetFullPath(File1.Path) & File1.List(i)
        sFileNew$ = CTools.GetFullPath(Text2) & File1.List(i)
        If CTools.ExistFile(sFileNew) Then
            FileCopy sFileNew, sFile
        Else
            Debug.Print sFile
        End If
        Caption = i
    Next
    
End Sub

Private Sub Dir1_Change()
    File1.Path = Dir1.Path
End Sub

Private Sub Form_Load()
    Dir1.Path = App.Path
    File1.Path = App.Path
    Text1 = App.Path
    Text2 = "c:\windows\system"
    
End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn Then
        Dir1.Path = Text1
    End If
End Sub
