找回密码
 注册

QQ登录

只需一步,快速开始

查看: 742|回复: 7

Copy files modified using VBScript

[复制链接]
发表于 2013-5-17 13:52:10 | 显示全部楼层 |阅读模式
  1. Const srcDir = "C:\HourTest"
  2. Const destDir = "H:\HourTest"
  3. hourAgo = DateAdd("h", -1, Now)
  4. Set fso = CreateObject("Scripting.FileSystemObject")

  5. For Each f In fso.GetFolder(srcDir).Files
  6.   If f.DateLastModified > hourAgo Then _
  7.     f.Copy destDir & ""
  8. Next 'f
复制代码
Just a simple demo

 楼主| 发表于 2013-5-17 14:52:12 | 显示全部楼层
  1. Const srcDir = "C:\Test"
  2. Const destDir = "H:\Test"
  3. hourAgo = DateAdd("h", -1, Now)
  4. ShowText = ""
  5. SameText = ""
  6. UpText=""
  7. Set fso = CreateObject("Scripting.FileSystemObject")

  8. For Each f In fso.GetFolder(srcDir).Files
  9.     If f.DateLastModified > hourAgo Then _
  10.       'f.Copy destDir & ""
  11.       'Wscript.Echo destDir
  12.       UpText = UpText & VBCrLf & "    " & destDir & "" & f.name & " - " & f.DateLastModified
  13.       'Fl = fso.GetFile(f)
  14.       'UpText = UpText & VBCrLf & "    " & destDir & "" & fso.GetFileName(fl) & " - " & f.DateLastModified
  15.     Else
  16.       SameText = SameText & VBCrLf & "        " & f.name & "    " & f.DateLastModified
  17.       '& "(" & f & ")"
  18.     End If
  19. Next 'f
  20. Wscript.Echo "Changed:" & UpText & VBCrLf & "Unchanged:" & SameText
复制代码
More intuitive code.

发表于 2013-5-23 08:37:47 | 显示全部楼层

compare 2 files by date modified and copy new file using VBScript

本帖最后由 Test 于 2013-5-23 08:41 编辑

A more flexible source code:
  1. Option Explicit

  2. Dim WshShell
  3. Dim fso
  4. Dim USERPROFILE
  5. Dim srcPath
  6. Dim tgtPath
  7. On Error Resume Next
  8. Set WshShell = WScript.CreateObject("Wscript.Shell")
  9. Set fso = WScript.CreateObject("Scripting.FilesystemObject")
  10. 'USERPROFILE = WshShell.ExpandEnvironmentStrings("%USERPROFILE%")
  11. srcPath = "\\hssphn140029\Source Folder\TitleX.txt"
  12. tgtPath = "\\hssd4550xp\Target Folder\TitleX.txt"
  13. If Not fso.FileExists(tgtPath) Then
  14.         fso.CopyFile srcPath, tgtPath, True
  15. ElseIf fso.FileExists(srcPath) Then
  16.         ReplaceIfNewer srcPath, tgtPath
  17. End If

  18. Sub ReplaceIfNewer(strSourceFile, strTargetFile)
  19.         Const OVERWRITE_EXISTING = True
  20.         Dim objFso
  21.         Dim objTargetFile
  22.         Dim dtmTargetDate
  23.         Dim objSourceFile
  24.         Dim dtmSourceDate
  25.         Set objFso = WScript.CreateObject("Scripting.FileSystemObject")
  26.         Set objTargetFile = objFso.GetFile(strTargetFile)
  27.         dtmTargetDate = objTargetFile.DateLastModified
  28.         Set objSourceFile = objFso.GetFile(strSourceFile)
  29.         dtmSourceDate = objSourceFile.DateLastModified
  30.         If (dtmTargetDate < dtmSourceDate) Then
  31.                 objFso.CopyFile objSourceFile.Path, objTargetFile.Path,OVERWRITE_EXISTING
  32.         End If
  33.         Set objFso = Nothing
  34. End Sub
复制代码
Then it may be better with an extra para to tell how long it modified then update it.
   
发表于 2013-5-23 11:01:49 | 显示全部楼层

Reading and writing value from a textfile

To Write:
  1. Set objFileToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\listfile.txt",2,true)
  2. objFileToWrite.WriteLine(data)
  3. objFileToWrite.Close
  4. Set objFileToWrite = Nothing
复制代码
OpenTextFile parameters:
<filename>, IOMode (1=Read,2=write,8=Append), Create (true,false), Format (-2=System Default,-1=Unicode,0=ASCII)


To Read the entire file
  1. Set objFileToRead = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\listfile.txt",1)
  2. strFileText = objFileToRead.ReadAll()
  3. objFileToRead.Close
  4. Set objFileToRead = Nothing
复制代码
To Read line by line
  1. Set objFileToRead = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\listfile.txt",1)
  2. Dim strLine
  3. do while not objFileToRead.AtEndOfStream
  4.      strLine = objFileToRead.ReadLine()
  5.      'Do something with the line
  6. loop
  7. objFileToRead.Close
  8. Set objFileToRead = Nothing
复制代码
发表于 2013-5-23 12:36:36 | 显示全部楼层

Date formatting in VBScript -- more to be useful

本帖最后由 Test 于 2013-5-23 12:45 编辑

Cheat sheet


<%= Date()%>         08/04/2007
<%=Now()%>         08/04/2007 20:20:15
<%=Time()%>         20:20:15
<%=FormatDateTime(Now(),vbGeneralDate)%>         08/04/2007 20:20:15
<%=FormatDateTime(Now(),vbLongDate)%>         08 April 2007
<%=FormatDateTime(Now(),vbShortDate)%>         08/04/2007
<%=FormatDateTime(Now(),vbLongTime)%>         20:20:15
<%=FormatDateTime(Now(),vbShortTime)%>         20:20
<%=Year(Now())%>         2007
<%=Month(Now())%>         4
<%=Day(Now())%>         8
<%=Hour(Now())%>         20
<%=Minute(Now())%>         20
<%=Second(Now())%>         15
<%=WeekDay(Now())%>         1
<%=WeekDayName(WeekDay(Now()))%>         Sunday
<%=WeekDayName(WeekDay(Now()),1)%>         Sun
<%=MonthName(Month(Now()))%>         April
<%=MonthName(Month(Now()),1)%>         Apr
           
DatePart("d", Now)         8 (Day of Month)
DatePart("w", Now)         1 (Week of Month)
DatePart("m", Now)         4 (Month of Year)
DatePart("ww", Now)         15 (Week of Year)
DatePart("y", Now)         98 (Day of Year)
DatePart("yyyy", Now)         2007 (Year)
DatePart("q", Now)         2 (Quarter)
DatePart("h", Now)         20 (Hour)
DatePart("n", Now)         20 (Minute)
DatePart("s", Now)         15 (Second)



vbUseSystem
       0
        Uses the National Language Support API to determine the first full week based on the regional and language settings.

vbFirstJan1
        1
        Sets the first week as the week in which January 1 occurs. (Default)

vbFirstFourDays
        2
        Sets the first week as the first week to have at least four days in it.

VbFirstFullWeek
        3
        Sets the first week as the first week that begins on a Sunday.


DatePart("ww", Now, vbUseSystem)         14
DatePart("ww", Now, vbFirstJan1)         15
DatePart("ww", Now, vbFirstFourDays)         14
DatePart("ww", Now, VbFirstFullWeek)         15

Use of concatentation to customise date display:

<%
Response.Write WeekDayName(WeekDay(Now())) & _
", " & MonthName(Month(Now())) & _
" " & Day(Now()) & ", " & Year(Now())
%>

gives

Sunday, April 8, 2007

To write out the ordinal suffix for the day:

<%
Select Case Day(Now())
Case 1,21,31
ordsuffix = "st"
Case 2,22
ordsuffix = "nd"
Case 3,23
ordsuffix = "rd"
Case else
ordsuffix = "th"
End select
Response.Write (WeekDayName(WeekDay(Now())))
Response.Write (", ")
Response.Write (MonthName(Month(Now())))
Response.Write (" ")
Response.Write (Day(Now())
Response.Write (ordsuffix)
Response.Write (" ")
Response.Write (Year(Now())
%>

Sunday, April 8th 2007

Useful for schedule proccessing...

发表于 2013-5-23 13:19:14 | 显示全部楼层
本帖最后由 Test 于 2013-5-23 13:44 编辑

Thanks for the articles above. The final code just like this: Totally customizable on file list, time interval, and if you want want old file to be over writen or not...Further more, you can have a log file to record all the updates.
  1. ' --------------------------------
  2. ' Function: Synchronise files in different places either local or over the network
  3. ' Developed by: John Z
  4. ' Contact: cq_box@163.com
  5. ' Date: May 23, 2013
  6. ' -----------------------------------
  7.     Const srcDir = "D:\Source"
  8.     Const destDir = "\\Server\ShareFolder\DestFolder"
  9.     Const LogFile = "\\Server\ShareFolder\Logs\Entre_Log"
  10.     Const OVERWRITE_EXISTING = True
  11.     Const DayOfDeffer = 0
  12.    
  13.     FileList = Array("File_1","Second.exe","Third.txt","Four.vbs","Five.jpg")
  14.     Set fso = CreateObject("Scripting.FileSystemObject")

  15.     For Each fn In FileList
  16.       If fso.FileExists(srcDir & "" & fn) Then
  17.         If Not fso.FileExists(DestDir & "" & fn) Then
  18.           Set objFileToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile(LogFile,8,true)
  19.           fso.CopyFile srcDir & "" & fn, DestDir & "" & fn, True
  20.           objFileToWrite.WriteLine(Year(Date) & "-" & Month(Date) & "-"  & Day(Date) & "  " & _
  21.              Time & " --- copy " & DestDir & "" & fn & " from " & srcDir & "" & fn)
  22.           objFileToWrite.Close
  23.           Set objFileToWrite = Nothing
  24.         ElseIf fso.FileExists(srcDir & "" & fn) Then
  25.           ReplaceIfNewer srcDir & "" & fn, DestDir & "" & fn, DayOfDeffer, OVERWRITE_EXISTING
  26.         End If
  27.       End If
  28.     Next 'fn
  29.     'Wscript.Echo "Done."
  30.    
  31.     Sub ReplaceIfNewer(strSourceFile, strTargetFile, DayDiffer, OVRWrite)
  32.         Dim objFso
  33.         Dim objTargetFile
  34.         Dim dtmTargetDate
  35.         Dim objSourceFile
  36.         Dim dtmSourceDate
  37.         Set objFileToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile(LogFile,8,true)
  38.         Set objFso = WScript.CreateObject("Scripting.FileSystemObject")
  39.         Set objTargetFile = objFso.GetFile(strTargetFile)
  40.         dtmTargetDate = objTargetFile.DateLastModified
  41.         Set objSourceFile = objFso.GetFile(strSourceFile)
  42.         dtmSourceDate = objSourceFile.DateLastModified
  43.         If ( dtmSourceDate > DateAdd("d", DayOfDeffer, dtmTargetDate )) Then
  44.                 objFso.CopyFile objSourceFile.Path, objTargetFile.Path, OVRWrite
  45.                 objFileToWrite.WriteLine(Year(Date) & "-" & Month(Date) & "-"  & Day(Date) & "  " & Time & " --- update " & strTargetFile & " from " & strSourceFile)
  46.         End If
  47.         Set objFso = Nothing
  48.         objFileToWrite.Close
  49.         Set objFileToWrite = Nothing
  50.     End Sub
复制代码
Can just use it after openning this box.


 楼主| 发表于 2013-5-27 06:36:39 | 显示全部楼层
本帖最后由 demo 于 2013-5-27 22:38 编辑

With a little extra function attached. maybe good for some special circumstances. AND... It's easy to extand it ....
  1. ' --------------------------------
  2. ' Function: Synchronise files in different places either local or over the network
  3. ' Developed by: John Z
  4. ' Contact: cq_box@163.com
  5. ' Date: May 23, 2013
  6. ' -----------------------------------
  7.     Const srcDir = "\\The\Source\Dat"
  8.     Const destDir = "D:\Destination\Dir"
  9.     Const LogFile = "\\Server\Logs\MonthEnd_Log"
  10.     Const ErrLog = "\\Server\Logs\Error_Log"
  11.     Const OVERWRITE_EXISTING = True
  12.     Const DayOfDeffer = 27
  13.    
  14.     Dim FileList
  15.     Dim Flg, strErr
  16.    
  17.     FileList = Array("binloc.txt","order.txt","product.txt","customer.txt")
  18.     Flg = False
  19.     strErr = ""

  20.     Set fso = CreateObject("Scripting.FileSystemObject")

  21.     For Each fn In FileList
  22.       On Error Resume Next
  23.    
  24.       If fso.FileExists(srcDir & "" & fn) Then
  25.         If Not fso.FileExists(DestDir & "" & fn) Then
  26.           Set objFileToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile(LogFile,8,true)
  27.           fso.CopyFile srcDir & "/" & fn, DestDir & "" & fn, True
  28.           objFileToWrite.WriteLine(Year(Date) & "-" & Month(Date) & "-"  & Day(Date) & "  " & Time & " --- copy " & DestDir & "" & fn & " from " & srcDir & "" & fn)
  29.           objFileToWrite.Close
  30.           Set objFileToWrite = Nothing
  31.           Flg = True
  32.         ElseIf fso.FileExists(srcDir & "" & fn) Then
  33.           ReplaceIfNewer srcDir & "" & fn, DestDir & "" & fn, DayOfDeffer, OVERWRITE_EXISTING
  34.         End If
  35.       End If
  36.    
  37.       If err.number <> 0 Then
  38.           Set objErrToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile(ErrLog,8,true)
  39.           objErrToWrite.WriteLine(Year(Date) & "-" & Month(Date) & "-"  & Day(Date) & "  " & Time & " --- Error on File (" & fn & "): " & err.Description)
  40.           objErrToWrite.Close
  41.           Set objErrToWrite = Nothing
  42.       End If
  43.     Next 'fn
  44.    
  45.     If Flg Then
  46.         CrLf_Convert FileList
  47.     End If
  48.    
  49.     Set fso = Nothing
  50.     'Wscript.Echo "Done."
  51.    
  52.    
  53.     Sub ReplaceIfNewer(strSourceFile, strTargetFile, DayDiffer, OVRWrite)
  54.         Dim objFso
  55.         Dim objTargetFile
  56.         Dim dtmTargetDate
  57.         Dim objSourceFile
  58.         Dim dtmSourceDate
  59.         Set objFileToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile(LogFile,8,true)
  60.         Set objFso = WScript.CreateObject("Scripting.FileSystemObject")
  61.         Set objTargetFile = objFso.GetFile(strTargetFile)
  62.         dtmTargetDate = objTargetFile.DateLastModified
  63.         Set objSourceFile = objFso.GetFile(strSourceFile)
  64.         dtmSourceDate = objSourceFile.DateLastModified
  65.         If ( dtmSourceDate > DateAdd("d", DayOfDeffer, dtmTargetDate )) Then
  66.                 objFso.CopyFile objSourceFile.Path, objTargetFile.Path, OVRWrite
  67.                 objFileToWrite.WriteLine(Year(Date) & "-" & Month(Date) & "-"  & Day(Date) & "  " & Time & " --- update " & strTargetFile & " from " & strSourceFile)
  68.                 Flg = True
  69.         End If
  70.         Set objFso = Nothing
  71.         objFileToWrite.Close
  72.         Set objFileToWrite = Nothing
  73.     End Sub
  74.    
  75.     Sub CrLf_Convert(objARG)
  76.         '*  
  77.         '*  Declare Constants  
  78.         '*  
  79.   
  80.         Const cVBS = "2crlf_v2.vbs - Convert CR/LF to CRLF  Version 2"  
  81.   
  82.         '*  
  83.         '*  Declare Variables  
  84.         '*  
  85.   
  86.         Dim boo_CR  
  87.         Dim boo_LF  
  88.         Dim boo_OK  
  89.         Dim intARG, intLEN  
  90.         Dim strARG, strDST  
  91.         Dim strMSG  
  92.   
  93.         strMSG = "Converted files:" & vbCrLf  
  94.         strDST = "_a.txt"
  95.   
  96.         Dim strOTF  
  97.   
  98.         '*  
  99.         '*  Declare Objects  
  100.         '*  
  101.   
  102.         'Dim objARG  
  103.         'Set objARG = WScript.Arguments  
  104.         Dim objFSO, objLogWrite  
  105.         Set objFSO = CreateObject("Scripting.FileSystemObject")  
  106.         Set objLogToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile(LogFile,8,true)
  107.         Dim objOTF  
  108.   
  109.         '*  
  110.         '*  Convert Each Drag-and-Drop File  
  111.         '*  
  112.          
  113.         For intARG = 0 to uBound(objARG)   'objARG.Count - 1  
  114.             Dim dFile
  115.             On Error Resume Next
  116.             
  117.             strARG = destDir & "" & objARG(intARG)  
  118.             intLEN = len(strARG)
  119.             'strDST = destDir & "" & mid(strARG,1,intLEN-4) & "_a.txt"  'strDst
  120.             strDST = mid(strARG,1,intLEN-4) & "_a.txt"  'strDst
  121.             strMSG = strMSG & vbCrLf & strARG  
  122.             If objFSO.FileExists(strARG) Then  
  123.   
  124.         '*  
  125.         '*  Read File  
  126.         '*  
  127.   
  128.                 dFile = strARG
  129.                 Set objOTF = objFSO.OpenTextFile(strARG,1)  
  130.                 strOTF = objOTF.ReadAll()  
  131.                 Set objOTF = Nothing  
  132.   
  133.         '*  
  134.         '*  Convert File (if applicable)  
  135.         '*  
  136.   
  137.                 boo_CR = False  
  138.                 boo_LF = False
  139.                 dFile = strDST
  140.   
  141.                 If InStr(strOTF,vbCr) > 0 Then boo_CR = True  
  142.                 If InStr(strOTF,vbLf) > 0 Then boo_LF = True  
  143.   
  144.                 If boo_CR And boo_LF Then  
  145.                     boo_OK = False  
  146.                     strMSG = strMSG & vbCrLf & vbTab & "(Not Converted)"  
  147.                 ElseIf boo_CR Then  
  148.                     strOTF = Replace(strOTF,vbCr,vbCrLf)  
  149.                     boo_OK = True  
  150.                     strMSG = strMSG & vbCrLf & vbTab & "(Converted CR)"  
  151.                 ElseIf boo_LF Then  
  152.                     strOTF = Replace(strOTF,vbLf,vbCrLf)  
  153.                     boo_OK = True  
  154.                     strMSG = strMSG & vbCrLf & vbTab & "(Converted LF)"  
  155.                 End If  
  156.   
  157.         '*  
  158.         '*  Write File  
  159.         '*  
  160.   
  161.                 If boo_OK Then  
  162.                     Set objOTF = objFSO.OpenTextFile(strDST,2,True)  
  163.                     objOTF.Write(strOTF)  
  164.                     Set objOTF = Nothing  
  165.                 End If  
  166.   
  167.             Else  
  168.                 strMSG = strMSG & vbCrLf & vbTab & "(File Not Found)"  
  169.             End If  

  170.             If err.number <> 0 Then
  171.                 Set objErrToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile(ErrLog,8,true)
  172.                 objErrToWrite.WriteLine(Year(Date) & "-" & Month(Date) & "-"  & Day(Date) & "  " & Time & " --- Error on File (" & dFile & "): " & err.Description)
  173.                 objErrToWrite.Close
  174.                 Set objErrToWrite = Nothing
  175.                 objLogToWrite.WriteLine(Year(Date) & "-" & Month(Date) & "-"  & Day(Date) & "  " & Time & " --- Error!!! " & dFile & ": see error log for detail.")
  176.             End If
  177.          
  178.         Next  
  179.   
  180.         '*  
  181.         '*  Destroy Objects  
  182.         '*  
  183.   
  184.         'Set objARG = Nothing  
  185.         Set objFSO = Nothing  
  186.         objLogToWrite.Close
  187.         Set objLogToWrite = Nothing
  188.   
  189.         '*  
  190.         '*  Done  
  191.         '*  
  192.   
  193.         'MsgBox strMSG,vbInformation,cVBS
  194.     End Sub
复制代码
 楼主| 发表于 2013-6-11 13:13:07 | 显示全部楼层
You can also changing the filename while moving it.
  1.     '************************************
  2.     '* Function: copy files to another place with customized file name while it is updated.
  3.     '* Coded by: John Z
  4.     '* Email: cq_box@163.com
  5.     '* Date of done: June 11, 2013
  6.     '************************************
  7.     Const srcDir = "\\SourceServer\src_folder"
  8.     Const destDir = "\\DestServer\new_folder"
  9.     Const LogFile = "\\DestServer\Logs\Update_Log"
  10.     Const OVERWRITE_EXISTING = True
  11.     Const DayOfDeffer = 27
  12.         Dim ix
  13.    
  14.     FileList = Array("sales_forecast_inv.txt","xback.ps1","ps_sign_help.txt","usr.vbs","up.vbs")
  15.     DFleList = Array("inventory_list.txt","xback_1.ps1","ps_sign_help_1.txt","","up_1.vbs")
  16. ShowText = ""
  17.     SameText = ""
  18.     UpText=""
  19.     ix = 0
  20.     Set fso = CreateObject("Scripting.FileSystemObject")

  21.     For Each fn In FileList
  22.       If (DFleList(ix)="") Then
  23.         fnd =fn
  24.       Else
  25.         fnd = DFleList(ix)
  26.       End If
  27.       If Not fso.FileExists(DestDir & "" & fnd) Then
  28.         If fso.FileExists(srcDir & "" & fn) Then
  29.             Set objFileToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile(LogFile,8,true)
  30.             fso.CopyFile srcDir & "" & fn, DestDir & "" & fnd, True
  31.             objFileToWrite.WriteLine(Year(Date) & "-" & Month(Date) & "-"  & Day(Date) & "  " & Time & " --- copy " & DestDir & "" & fnd & " from " & srcDir & "" & fn)
  32.             objFileToWrite.Close
  33.             Set objFileToWrite = Nothing
  34.         End If
  35.       ElseIf fso.FileExists(srcDir & "" & fn) Then
  36.         ReplaceIfNewer srcDir & "" & fn, DestDir & "" & fnd, DayOfDeffer, OVERWRITE_EXISTING
  37.       End If
  38.       ix = ix + 1
  39.     Next 'fn
  40.     'Wscript.Echo "Done."
  41.    
  42.     Sub ReplaceIfNewer(strSourceFile, strTargetFile, DayDiffer, OVRWrite)
  43.         Dim objFso
  44.         Dim objTargetFile
  45.         Dim dtmTargetDate
  46.         Dim objSourceFile
  47.         Dim dtmSourceDate
  48.         Set objFileToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile(LogFile,8,true)
  49.         Set objFso = WScript.CreateObject("Scripting.FileSystemObject")
  50.         Set objTargetFile = objFso.GetFile(strTargetFile)
  51.         dtmTargetDate = objTargetFile.DateLastModified
  52.         Set objSourceFile = objFso.GetFile(strSourceFile)
  53.         dtmSourceDate = objSourceFile.DateLastModified
  54.         
  55.         'Wscript.echo "Src: " & dtmSourceDate & VBCrLf & "Dst: " & dtmTargetDate & VBCrLf & "Later than: " & DateAdd("d", DayOfDeffer, dtmTargetDate )
  56.         If ( dtmSourceDate > DateAdd("d", DayOfDeffer, dtmTargetDate )) Then
  57.                 If objFso.FileExists(strTargetFile) Then
  58.                     'Set objBakFile = objFso.GetFile(strTargetFile & ".bak")
  59.                     objFso.CopyFile objTargetFile.Path, objTargetFile.Path & ".bak", OVRWrite
  60.                     'set objBakFile = nothing
  61.                 End If
  62.                 objFso.CopyFile objSourceFile.Path, objTargetFile.Path, OVRWrite
  63.                 objFileToWrite.WriteLine(Year(Date) & "-" & Month(Date) & "-"  & Day(Date) & "  " & Time & " --- update " & strTargetFile & " from " & strSourceFile)
  64.         End If
  65.         Set objFso = Nothing
  66.         objFileToWrite.Close
  67.         Set objFileToWrite = Nothing
  68.     End Sub
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|BC Morning Website ( Best Deal Inc. 001 )

GMT-8, 2026-4-11 14:05 , Processed in 0.015493 second(s), 17 queries .

Supported by Weloment Group X3.5

© 2008-2026 Best Deal Online

快速回复 返回顶部 返回列表