- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2019-5-31 05:26 ½s¿è
¦^´_ 11# PJChen
¸Õ¸Õ¬Ý- Option Explicit
- Sub EX()
- Dim SF As Object, Source_Folder As String, Target_Folder As String
- Dim Source_File As String, E As Variant, E1 As Variant
- Source_Folder = "W:\Ī¦Ë¦@¥Î\ÜÀx¦@¥Î"
- Target_Folder = "D:\0_¦Ûqªí³æ\Backup\ÜÀx¦@¥Î " & Format(Date, "YYYYMMDD")
- If Dir(Target_Folder, vbDirectory) <> "" Then '¶Ç¦^³o¸ê®Æ§¨¥Ø¿ý
- Set SF = CreateObject("Scripting.FileSystemObject")
- For Each E In SF.GetFolder(Source_Folder)
- For Each E1 In SF.GetFolder(Target_Folder)
- Source_File = E.Path & "\*.xlsx"
- If E.Path Like "*¯Z²z³f´«ºâªí" And E1.Path Like "*¯Z²z³f´«ºâªí" Then
- Source_File = E1.Path & "\*" & Format(Date, "M") & "¤ë*.xlsx"
- End If
- SF.CopyFile Source_File, E1.Path
- Next
- Next
- Else
- MsgBox "§ä¨B¨ì " & vbLf & Target_Folder
- End If
- End Sub
½Æ»s¥N½X |
|