Foxtable(狐表)用户栏目专家坐堂 → [求助]备份文件数量


  共有2558人关注过本帖树形打印复制链接

主题:[求助]备份文件数量

帅哥哟,离线,有人找我吗?
lsy
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:5246 积分:33163 威望:0 精华:8 注册:2013/1/17 21:28:00
  发帖心情 Post By:2014/9/29 15:15:00 [显示全部帖子]

e.Button.Enabled = False
StatusBar.Message2 = "正在备份...请稍候..."
StatusBar.Refresh
Dim dt As String
Dim nm As String
For i As Integer = 1 To 3
    Dim ifo As New FileInfo(ProjectPath & "备份\bak" & i)
    If i = 1 Then
        dt = ifo.CreationTime
        nm = ifo.Name
    Else
        If ifo.CreationTime < dt Then
            dt = ifo.CreationTime
            nm = ifo.Name
        End If
    End If
Next
FileSys.DeleteDirectory(ProjectPath & "备份\" & nm,2,2)
FileSys.CreateDirectory(ProjectPath & "备份\" & nm)
Syscmd.Project.Backup(ProjectPath & "备份\" & nm, True)
StatusBar.Message2 = ""
StatusBar.Refresh
MessageBox.Show("完毕")
e.Button.Enabled = True
[此贴子已经被作者于2014-9-29 15:24:32编辑过]

 回到顶部