asp批量建立文件夹问题

rebelHACK 2014-10-20 04:07:48
求段代码 读取1.txt 然后每行的内容为建立的文件夹的名字,批量建立。
...全文
68 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
宁静志远 2014-10-20
  • 打赏
  • 举报
回复

	'文本文件名
	txtName ="111.txt"
	Set Fso = Server.CreateObject("Scripting.FileSystemObject")
	Set myFile = Fso.OpenTextFile(Server.MapPath(txtName),1,True)
	While Not myFile.AtEndOfStream
		str = myFile.ReadLine
		If fso.folderexists(Server.MapPath(str)) Then
			Response.write "文件夹"&str&"已经创建<br/>"
		Else 
			fso.CreateFolder(Server.MapPath(str))
			Response.write "文件夹"&str&"创建成功<br/>"
		End If
	Wend
	myFile.Close
	Set myFile = Nothing
	Set Fso = Nothing
slwsss 2014-10-20
  • 打赏
  • 举报
回复

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧