D盘,新建文本文件 list.txt,包括三行内容,分别是"A1"、“A2"、”A3“=======================================
Dim i
Dim str(3)
list = Plugin.File.OpenFile("D:\list.txt")
For i = 0 To 2
str(i) = Plugin.File.ReadLine(list)
Call Plugin.File.CreateFolder("D:\BBB\"&str(i))
Delay 1000
Next
Call Plugin.File.CloseFile(list)
MessageBox "OK"
=========================================
运行后,D:\BBB目录里,只有”A1"一个目录。
百思不得其解啊!!把脚本改一下,
========先读取,再新建目录==============
Dim i
Dim str(3)
list = Plugin.File.OpenFile("D:\list.txt")
For i = 0 To 2
str(i) = Plugin.File.ReadLine(list)
Next
Call Plugin.File.CloseFile(list)
//新建文件夹
For i = 0 To 2
Call Plugin.File.CreateFolder("D:\BBB\"&str(i))
Delay 1000
Next
MessageBox "OK"
=================================
运行后,结果还是一样:只有”A1"一个目录。
大神们看看问出在哪了?
脚本再改改,只要不读取list.txt,就不会出错,会新建三个文件夹
========================
Dim i
Dim str(3)
str(0)="A1"
str(1)="A2"
str(2)="A3"
//新建文件夹
For i = 0 To 2
Call Plugin.File.CreateFolder("D:\BBB\"&str(i))
Delay 1000
Next
MessageBox "OK"
============================