- Option Explicit
-
- Dim i, objFso, strPath
- Set objFso = CreateObject("Scripting.FileSystemObject")
- With WScript
- strPath = Left(.ScriptFullName, InStrRev(.ScriptFullName, "\", -1, vbTextCompare))
- End With
- For i = 1 To 10
- objFso.CreateTextFile strPath & FormatNum(i) & ".txt", True
- Next
- Set objFso = Nothing
-
- Function FormatNum(intNum)
- FormatNum = String(3 - Len(intnum), "0") & intnum
- End Function
复制代码 自己改改吧... |