Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21273

[RESOLVED] Is this the right way

$
0
0
Hi

I wonder if this is going to be the way I think

Dim strFile As String
Dim FileCount As Integer
FileCount = 0
strFile = Dir(App.Path & "\backup\backup\PhoneTel.mdb" & Format(Now, "yymmdd_hhnn") & ".mdb")
Do Until strFile = ""
FileCount = FileCount + 1
strFile = Dir
Loop
' MsgBox FileCount & " file(s)"

if filecount => 4 then
Kill App.Path & "\backup\backup\PhoneTel.mdb??????_????.mdb"
else
sourcefile1 = App.Path & "\PhoneTel.mdb"
destinationfile1 = App.Path & "\backup\backup\PhoneTel.mdb" & Format(Now, "yymmdd_hhnn") & ".mdb"

FileCopy sourcefile1, destinationfile1


Bonzo

Viewing all articles
Browse latest Browse all 21273

Trending Articles