做一个文件列表,里边包含各个文件的修改
时间,也可以包括下载后的路径,上传到服务器,使用URLDownloadToFile下载这个列表,然后filedatetime同本地文件比较修改时间,将修改时间不相同的文件下载下来并替换,即可。ADO控件与数据库拦空连接代码如下Dim conn As New ADODB.Connection Dim rs As New ADODB.Recordset Private Sub Command1_Click() '插入数据: If rs.State <>adStateClosed Then '检查记录集状态 rs.Close End If rs.Open "纯亏insert into T_user(name,age) values('" &txtname.Text &"'," &txtage &")", conn, adOpenDynamic, adLockBatchOptimistic If rs.State <>adStateClosed Then rs.Close End If '更新DataGrid1数据 rs.Open "select * from T_user", conn, adOpenDynamic, adLockBatchOptimistic Set DataGrid1.DataSource = rs End Sub Private Sub Form_Load() conn.Open "Provider=Microsoft.Jet.OLEDB.4.0Data Source=C:\Documents and Settings\hb\桌面\db1.mdbPersist Security Info=False" conn.CursorLocation = adUseClient '游标放简裤瞎在客户端 rs.CursorLocation = adUseClient rs.Open "select * from T_user", conn, adOpenDynamic, adLockBatchOptimistic Set DataGrid1.DataSource = rs End Sub Private Sub Form_Unload(Cancel As Integer) rs.Close '释放 conn.Close Set rs = Nothing Set conn = Nothing End Subs=trim(command())
'取得命令行参数
应该是这个形式:FastCopy.exe
网络目录名,文件名
's的返回值是
网络目录名,文件名
如:“\\liang\,myadd.exe"
'然后为了区烂备分开目录名和文件名,就查销衡找","号
p=instr(1,s,",")
'如果找到饥斗毁就分别取“,”前面的目录和后面的应用程序名。
评论列表(0条)