发布网友 发布时间:2022-04-22 06:36
共2个回答
热心网友 时间:2024-02-24 15:03
Sub 创建文件夹()
Dim F As String
Dim P As String
Dim S As String
P = "D:\123"
P = IIf(Right(P, 1) = "\", P, P & "\")
F = Dir(P & "*.XLS*")
Do While F <> ""
S = Left(F, InStrRev(F, ".") - 1)
MkDir P & S
Name P & F As P & S & "\" & F
F = Dir
Loop
MsgBox "操作完成!"
End Sub
路径自己修改下。
热心网友 时间:2024-02-24 15:03
我可以帮你,不过现在没空,晚上回去啦,再给你吧!