本帖最后由 pcl_test 于 2016-7-24 15:30 编辑
vbs- Set fso = CreateObject("Scripting.FileSystemObject")
-
- Set f = fso.OpenTextFile(WScript.ScriptFullName, 1)
- Do While f.AtEndOfStream <> true
- line = f.ReadLine
- If Left(line, 1) = "'" Then s = s& Mid(line, 2) &vbCrLf
- Loop
-
- date1 = DateValue("2015-01-01")
- date2 = DateValue("2015-01-05")
-
- Do Until date1 > date2
- Wrtxt(date1)
- date1 = DateAdd("d", 1 , date1)
- Loop
- Msgbox "Done"
-
- Function Wrtxt(d)
- yMd = right(year(d),4) & right("0" & month(d),2) & right("0" & day(d),2)
- fso.CreateTextFile(yMd &".txt", 2).Write replace(s, "$日期$", yMd)
- ENd Function
-
- '$url = "http://bbs.kafan.cn/soft/$日期$/"
- 'For $i = 0 To 9999
- ' $id = StringFormat('%04s', $i)
- ' $file = $url & $id &".exe"
- ' ToolTip($file)
- ' InetGet($file,
- '@ScriptDir& "\" &
- 'StringTrimLeft($file,
- 'StringInStr($file, "/", 2, -1)), 1)
- 'Next
复制代码
|