亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? clstransfer.cls

?? simple vb ftp file tranfer project code
?? CLS
?? 第 1 頁 / 共 2 頁
字號:
        strData = Trim(Mid(line, pos + 1))
        
        strFiles = Split(strData, ";")
        strLocal = Trim(strFiles(0))
        strRemote = Trim(strFiles(1))
        Call PutFiles(strLocal, strRemote)
        logfile.AddToLogFile ("Put files " & vbCrLf)
        Exit Sub
    End If
    
    '------------------------------------------
    'Command format :       [GET] = <remote file name> ; <local file name>
    'Example :              [GET] = Disclaimer.txt ; C:\Temp\Disclaimer.txt
    'FTP the file from the server to the local drive
    If InStr(1, LCase(line), "[get]") > 0 Then
        pos = InStr(1, line, "=")
        strData = Trim(Mid(line, pos + 1))
        
        strFiles = Split(strData, ";")
        strRemote = Trim(strFiles(0))
        strLocal = Trim(strFiles(1))
        DeleteLocalFile (strLocal)
        frmMain.ftp.Execute , "GET """ & strRemote & """ " & strLocal
            Do While frmMain.ftp.StillExecuting
                DoEvents
            Loop
          logfile.AddToLogFile ("ftp.Execute 'get' " & strData & vbCrLf)
        Exit Sub
    End If
    
    '------------------------------------------
    'Command format :       [GETDIRDIFFS] = <remote file name> ; <local file name>
    'Example :              [GETDIRDIFFS] = /iislogs/w3svc1/ ; d:\analog5\logfiles\
    'Gets the files from the server which are different to the files on the
    'local drive so that the remote and local files are same.
    'It does not delete the local files, it only deletes them when the
    'file size is different.
    'The GET function does not overright if the file already exits.
    If InStr(1, LCase(line), "[getdirdiffs]") > 0 Then
        pos = InStr(1, line, "=")
        strData = Trim(Mid(line, pos + 1))
        
        strFiles = Split(strData, ";")
        strRemote = Trim(strFiles(0))
        strLocal = Trim(strFiles(1))
        Call GetDirDiffs(strLocal, strRemote)
        logfile.AddToLogFile ("Get directory differences " & vbCrLf)
        Exit Sub
    End If
    
    '------------------------------------------
    'Delete local files
    'Command format :         [DELETELOCALFILES] = <local file spec>
    'Example :                [DELETELOCALFILES] = c:\temp\files\*.*
    If InStr(1, LCase(line), "[deletelocalfiles]") > 0 Then
        strFiles = Split(line, "=")
        strData = Trim(strFiles(1))
        DeleteLocalFile (strData)
        logfile.AddToLogFile ("Delete local files " & vbCrLf)
        Exit Sub
    End If

    '------------------------------------------
    'Close the ftp connection.
    'Command format :         [CLOSE]
    'Example :                [CLOSE]
    'ftp.Execute , "CLOSE"
    'Inet command : ftp.Execute, "CLOSE"
    If InStr(1, LCase(line), "[close]") > 0 Then
        frmMain.ftp.Execute , "CLOSE"
        logfile.AddToLogFile ("ftp.Execute, 'CLOSE' " & vbCrLf)
        logfile.AddToLogFile ("********************" & vbCrLf)
        Screen.MousePointer = vbDefault
        Exit Sub
    End If

    '------------------------------------------
    'Command format :         [LOGFILE]
    'Example :                [LOGFILE] = /islogs/w3svc1/ ; d:\analog5\logfiles\
    'Get latest logfile
    'this calculates the name of the last 7 days worth of log file and then
    'gets them from the server and places them into a local directory
    If InStr(1, LCase(line), "[logfile]") > 0 Then
        pos = InStr(1, line, "=")
        strData = Trim(Mid(line, pos + 1))
        
        For i = 1 To 7
          strDate = CalcDate(-i) 'calculate the date with reference to today's date
          strFiles = Split(strData, ";")
          strRemote = Trim(strFiles(0)) & strDate
          strLocal = Trim(strFiles(1)) & strDate
          DeleteLocalFile (strLocal)
          frmMain.ftp.Execute , "GET """ & strRemote & """ " & strLocal
              Do While frmMain.ftp.StillExecuting
                  DoEvents
              Loop
          Next
          logfile.AddToLogFile ("ftp.Execute 'get' " & strData & vbCrLf)
        Exit Sub
    End If

    '------------------------------------------
    'This exits the VB program
    'Command format :       [END]
    'Example :              [END]
    If InStr(1, LCase(line), "[end]") > 0 Then
        If Command$ <> "" Then
          logfile.AddToLogFile ("End program" & vbCrLf)
          logfile.AddToLogFile ("********************" & vbCrLf)
          End
        End If
        Exit Sub
    End If

End Sub
'*********************************
Private Sub DeleteLocalFile(filename)

  Dim fs, f

  On Error Resume Next        'in case of errors

  Set fs = CreateObject("Scripting.FileSystemObject")
  Set f = fs.GetFile(filename)
  f.Delete  'Delete the file
  
End Sub
'*********************************
'This calculates the logfile name for a given date
'the date is identified by 'back' which if -1 is
'yesterday, -2 is the day before, and so on
'format of log file is ex020515.log
'representing year - month - day
Private Function CalcDate(ByVal back As Integer) As String

Dim strYear As String
Dim strMonth As String
Dim strDay As String
Dim dteDate As Date

dteDate = DateAdd("d", back, Now())

strYear = Mid(CStr(DatePart("yyyy", dteDate)), 3)
strMonth = CStr(DatePart("m", dteDate))
If Len(strMonth) = 1 Then
  strMonth = "0" & strMonth
End If
strDay = CStr(DatePart("d", dteDate))
If Len(strDay) = 1 Then
  strDay = "0" & strDay
End If

CalcDate = "ex" & strYear & strMonth & strDay & ".log"

End Function
'*********************************
'Puts files from the local drive onto the remote drive
'strLocal is the local file spec
'strRemote is the remote directory
Private Sub PutFiles(ByVal strLocalDir As String, ByVal strRemoteDir As String)

Dim fs As Object
Dim LocalFileArray() As String  'A list of all the files in the local directory
Dim i As Integer
Dim strLocalFile As String

'first fill the local file array
Set fs = Application.FileSearch
With fs
    DoEvents
    .LookIn = strLocalDir       'start from here
    .SearchSubFolders = False   'search sub folders
    .filename = "*.*"         'which files to look for
    If .Execute() > 0 Then
        ReDim LocalFileArray(.FoundFiles.Count)
        For i = 1 To .FoundFiles.Count
            LocalFileArray(i) = .FoundFiles(i)
        Next i
    Else
        logfile.AddToLogFile ("There were no files found matching the criteria." & Chr(13) & Chr(10))
        If Command$ = "" Then
          MsgBox ("There were no files found matching the criteria.")
        End If
    End If
End With

For i = 0 To UBound(LocalFileArray)
  strLocalFile = Mid(LocalFileArray(i), Len(strLocalDir) + 1)
  If strLocalFile <> "" Then
  frmMain.ftp.Execute , "PUT """ & LocalFileArray(i) & """ " & strRemoteDir & strLocalFile
    Do While frmMain.ftp.StillExecuting
      DoEvents
    Loop
  End If
Next

End Sub
'*********************************
'Retrieves a remote directory by comparing
'the local directory contents and the remote
'directory contents then downloads the differences
Private Sub GetDirDiffs(ByVal strLocalDir As String, ByVal strRemoteDir As String)

Dim fs As Object
Dim i As Integer
Dim j As Integer
Dim temp As String
Dim LocalFileArray() As String  'A list of all the files in the local directory
Dim RemoteFileArray() As String 'A list of all the files in the remote directory
Dim DiffFileArray() As String   'A list of those file which are in the Remote Directory
                                'but not in the Local Directory
Dim bolFound As Boolean
Dim strRemote As String
Dim strLocal As String

'first fill the local file array
Set fs = Application.FileSearch
With fs
    DoEvents
    .LookIn = strLocalDir       'start from here
    .SearchSubFolders = False   'search sub folders
    .filename = "*.log"         'which files to look for
    If .Execute() > 0 Then
        ReDim LocalFileArray(.FoundFiles.Count)
        For i = 1 To .FoundFiles.Count
            LocalFileArray(i) = .FoundFiles(i)
        Next i
    Else
        logfile.AddToLogFile ("There were no files found matching the criteria." & Chr(13) & Chr(10))
        If Command$ = "" Then
          MsgBox ("There were no files found matching the criteria.")
        End If
    End If
End With

'Now fill the remote file array
frmMain.ftp.Execute , "DIR """ & strRemoteDir & Chr(34)
Do While frmMain.ftp.StillExecuting
  DoEvents
Loop

'bubble sort LocalFileArray
For i = 1 To UBound(LocalFileArray) - 1
  For j = 1 To UBound(LocalFileArray) - 1
    If LocalFileArray(j) > LocalFileArray(j + 1) Then
      temp = LocalFileArray(j)
      LocalFileArray(j) = LocalFileArray(j + 1)
      LocalFileArray(j + 1) = temp
    End If
  Next
Next

If STRCONTENT <> "" Then
    RemoteFileArray = Split(STRCONTENT, vbCrLf)
    'now compare localarray and remotearray contents and
    'ftp the ones that are in the remotearray but not in
    'the localarray
    
    'bubble sort RemoteFileArray
    For i = 1 To UBound(RemoteFileArray) - 1
      For j = 1 To UBound(RemoteFileArray) - 1
        If RemoteFileArray(j) > RemoteFileArray(j + 1) Then
          temp = RemoteFileArray(j)
          RemoteFileArray(j) = RemoteFileArray(j + 1)
          RemoteFileArray(j + 1) = temp
        End If
      Next
    Next
    
  'Local files are stored and sorted in LocalFileArray
  'Remote files are stored and sorted in RemotefileArray
  'Now compare one with the other
  ReDim DiffFileArray(UBound(RemoteFileArray))
  
  For i = 0 To UBound(RemoteFileArray)
    bolFound = False
    For j = 0 To UBound(LocalFileArray)
      If LocalFileArray(j) = RemoteFileArray(i) Then
        bolFound = True
      End If
    Next
    If bolFound = False Then
      DiffFileArray(i) = RemoteFileArray(i)
    End If
  Next

  'For i = 0 To UBound(DiffFileArray)
  '  MsgBox (DiffFileArray(i))
  'Next
    
  For i = 0 To UBound(DiffFileArray)
    'MsgBox (DiffFileArray(i)) 'list of differences
    'ftp GET the differences
    If DiffFileArray(i) <> "" Then
      strRemote = strRemoteDir & DiffFileArray(i)
      strLocal = strLocalDir & DiffFileArray(i)
      'MsgBox (DiffFileArray(i))
      frmMain.ftp.Execute , "GET """ & strRemote & """ " & strLocal
        Do While frmMain.ftp.StillExecuting
          DoEvents
      Loop
    End If
  Next
  
'  'Now check local and remote file sizes
'  'If there is a difference, download them
  For i = 0 To UBound(RemoteFileArray)
      If RemoteFileArray(i) <> "" Then
        strRemote = strRemoteDir & RemoteFileArray(i)
        strLocal = strLocalDir & RemoteFileArray(i)
        If GetRemoteFileSize(strRemote) <> GetLocalFileSize(strLocal) Then
          DeleteLocalFile (strLocal)  'delete local file first
          frmMain.ftp.Execute , "GET """ & strRemote & """ " & strLocal
              Do While frmMain.ftp.StillExecuting
                DoEvents
              Loop
        End If
      End If
  Next

End If

logfile.AddToLogFile ("Get directory differences " & vbCrLf)

End Sub
'*********************************
'Given a remote directory, delete all the files in that directory
'There seems to be a problem with deleting empty directories
'One solution is to put a temp file up so that the directory
'is not empty.
Sub DeleteRmtDirContents(ByVal strRemoteDir As String)

Dim RemoteFileArray() As String 'A array of all the files in the remote directory
Dim strFile As String
Dim i As Integer
Dim strLocal As String
Dim strRemote As String

strLocal = App.Path & "\vbftp.txt"

'First put a temporary file on the directory
frmMain.ftp.Execute , "PUT """ & strLocal & """ " & strRemote
  Do While frmMain.ftp.StillExecuting
    DoEvents
  Loop

'Now fill the remote file array
frmMain.ftp.Execute , "DIR """ & strRemoteDir & Chr(34)
Do While frmMain.ftp.StillExecuting
  DoEvents
Loop

If STRCONTENT <> "" Then
    RemoteFileArray = Split(STRCONTENT, vbCrLf)
    'now delete each file one at a time
    For i = 0 To UBound(RemoteFileArray)
      If RemoteFileArray(i) <> "" Then  'blank is a directory
        frmMain.ftp.Execute , "DELETE """ & strRemoteDir & RemoteFileArray(i) & """"
          Do While frmMain.ftp.StillExecuting
            DoEvents
          Loop
      End If
    Next
End If

End Sub
'*********************************
'Given a remote filename, returns the file size
Function GetRemoteFileSize(ByVal strFileName As String) As String

frmMain.ftp.Execute , "SIZE " & strFileName
Do While frmMain.ftp.StillExecuting
  DoEvents
Loop

GetRemoteFileSize = STRCONTENT

End Function
'*********************************
'Given a local filename, returns the file size
Function GetLocalFileSize(ByVal strFileName As String) As Long

Dim fs, f, s

On Error Resume Next

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(strFileName)
GetLocalFileSize = f.Size

End Function

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人欧美一区二区三区黑人麻豆| 视频一区在线视频| 一区二区三区资源| 亚洲色欲色欲www| 欧美a级理论片| 欧美日韩国产一级二级| 26uuu国产电影一区二区| 亚洲大型综合色站| 免费成人你懂的| 国产xxx精品视频大全| 欧美日本在线视频| 久久久久久**毛片大全| 日韩影视精彩在线| 欧美日韩高清一区二区| 综合色中文字幕| 成人午夜免费av| 欧美成人三级在线| 久久精品噜噜噜成人av农村| 欧美三日本三级三级在线播放| 国产日韩精品一区| 久久国产婷婷国产香蕉| 欧美一区二区三区白人| 全部av―极品视觉盛宴亚洲| 91黄视频在线观看| 一区二区激情视频| 91在线云播放| 国产精品伦一区| 97se亚洲国产综合在线| 国产精品少妇自拍| 日韩黄色免费电影| 日韩欧美一级片| 开心九九激情九九欧美日韩精美视频电影| 91麻豆蜜桃一区二区三区| 亚洲成人自拍网| 91精品国产乱| 成人自拍视频在线观看| 国产精品久久夜| 欧美色区777第一页| 激情综合网最新| 国产精品理论在线观看| 欧美日韩色综合| 黑人巨大精品欧美一区| 久久久久久久久久久久久夜| 91最新地址在线播放| 亚洲五月六月丁香激情| 欧美性色综合网| 韩国在线一区二区| 亚洲人成小说网站色在线 | 91影视在线播放| 午夜天堂影视香蕉久久| 精品国产免费久久| 91亚洲精品乱码久久久久久蜜桃| 亚洲国产aⅴ天堂久久| 日本一区二区三区电影| 欧美性xxxxxxxx| 不卡的电视剧免费网站有什么| 亚洲高清免费在线| 国产精品区一区二区三| 国产拍欧美日韩视频二区| 欧美精品v国产精品v日韩精品 | 成人一区在线看| 亚洲精品欧美专区| 中文字幕一区二区在线播放| 日韩精品影音先锋| 欧美成人伊人久久综合网| 欧洲精品在线观看| 91色porny在线视频| 国内成+人亚洲+欧美+综合在线 | 国产91精品一区二区| 国产在线精品一区二区| 麻豆精品一区二区av白丝在线| 天堂精品中文字幕在线| 亚洲欧美区自拍先锋| 一区二区三区四区激情| 一区二区三区在线高清| 欧美激情一区二区三区不卡| 久久精品亚洲国产奇米99 | 亚洲乱码中文字幕| 亚洲国产一区视频| 一片黄亚洲嫩模| 精品一区二区综合| 美女一区二区视频| 国产精品一二三四区| 国产在线视视频有精品| 成人av电影免费在线播放| 在线观看免费亚洲| 成人性色生活片| 日本韩国视频一区二区| 欧美剧情电影在线观看完整版免费励志电影| 91国偷自产一区二区使用方法| 91视频.com| 日韩欧美一区二区在线视频| 久久综合成人精品亚洲另类欧美| 最新国产成人在线观看| 日本vs亚洲vs韩国一区三区| 风间由美一区二区三区在线观看 | 玉足女爽爽91| 轻轻草成人在线| 欧美日韩三级在线| 欧美日本在线看| 91精品办公室少妇高潮对白| 欧美一区二区播放| 亚洲午夜av在线| 美女脱光内衣内裤视频久久影院| 成人动漫一区二区在线| 91精品国模一区二区三区| 亚洲一区二区四区蜜桃| 久久国产精品第一页| 日韩午夜精品电影| 亚洲一区二区三区四区的| 91麻豆精品秘密| 一区二区三区四区av| 欧美日韩综合不卡| 天天av天天翘天天综合网色鬼国产| 亚洲.国产.中文慕字在线| av亚洲精华国产精华| 久久综合九色综合欧美亚洲| 性做久久久久久免费观看欧美| 3d成人h动漫网站入口| 韩国av一区二区三区四区| 26uuu色噜噜精品一区二区| 九九九久久久精品| 亚洲视频综合在线| 欧美精品123区| 亚洲国产精品久久久久秋霞影院 | 中文字幕va一区二区三区| 成人免费毛片a| 日韩精品一二三四| 伊人婷婷欧美激情| 亚洲国产成人私人影院tom| av中文字幕不卡| 久久99国内精品| 一区二区三区在线视频免费观看| 日韩欧美在线不卡| 欧美精品色综合| 在线精品视频一区二区三四| 精品综合免费视频观看| 一区二区三区在线播| 欧美激情在线看| 国产欧美一区二区精品秋霞影院 | 日韩亚洲欧美中文三级| 欧美精品第一页| 欧美美女黄视频| 4438x成人网最大色成网站| 欧美日韩在线观看一区二区| 99re热这里只有精品免费视频| 国产伦理精品不卡| 国产在线一区二区| 日本欧美在线观看| 久久aⅴ国产欧美74aaa| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲成人午夜影院| 五月天激情综合| 日本人妖一区二区| 国产一区三区三区| 免费的成人av| 国产成人精品一区二区三区四区 | 欧美xxxxxxxx| 九一久久久久久| 捆绑变态av一区二区三区| 国产成人超碰人人澡人人澡| 91小视频在线| 国产一区二区三区在线观看精品| 日韩电影在线观看电影| 国产一区二区看久久| gogo大胆日本视频一区| 91老司机福利 在线| 日韩午夜电影在线观看| 亚洲激情中文1区| 91福利小视频| 亚洲美女在线国产| eeuss鲁一区二区三区| 国产精品视频免费看| 丁香激情综合国产| 国产日韩av一区| 成人久久18免费网站麻豆| 国产精品国产三级国产普通话三级| 精品亚洲国内自在自线福利| 欧美日产在线观看| 偷拍与自拍一区| 日本大香伊一区二区三区| 亚洲自拍欧美精品| 欧美日韩亚州综合| 久久爱www久久做| 久久久99精品免费观看| 国产制服丝袜一区| 久久久噜噜噜久噜久久综合| 免费观看日韩电影| 久久久99精品免费观看不卡| 国产成人精品综合在线观看 | 婷婷久久综合九色综合伊人色| 欧美美女视频在线观看| 国产福利一区在线观看| 亚洲欧洲成人av每日更新| 欧美日韩精品综合在线| 国产精品主播直播| 亚洲人成在线观看一区二区| 91香蕉视频污在线| 国产伦精品一区二区三区视频青涩 | 久久久久久久综合|