发布网友 发布时间:2022-05-23 21:41
共2个回答
热心网友 时间:2023-08-28 02:54
Sub 文件批量复制() '确保文件夹一一对应
Dim myFiles
Dim i, j, f
On Error Resume Next
For j = 1 To [c1].End(xlDown).Row
i = Cells(j, 3)
Debug.Print [c1].End(xlDown).Row
f = 0
myFiles = Dir("C:\Users\Administrator\Desktop\" & i & "\*.jpg")
'文件夹路径,win7系统
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Do While myFiles <> ""
Debug.Print myFiles
f = f + 1
myFiles = Dir
Loop
Cells(j, 6) = f
Next
End Sub
热心网友 时间:2023-08-28 02:54
1、D1输入