最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
使用FileSystemObject,举个例子给你
时间:2022-07-02 23:28:40 编辑:袖梨 来源:一聚教程网
自己看一下,应该比较简单
sub WriteIni(sRoot,sUser,sPassword,sQuota)
Const ftpservdir="C:Program FilesServ-U"
dim str(7),sFullPath
if isnull(sQuota) then sQuota=20480
sFullPath=sRoot & "" & sUser
Set FO=CreateObject("Scripting.FileSystemObject")
Set TF=FO.OpenTextFile( ftpservdir & "Serv-U.INI", 8, TRUE)
str(0)="[USER=" & sUser & "]" 'UserName
str(1)="Password=" & sPassword 'Password
str(2)="HomeDir=" & sFullPath 'Directory
str(3)="ChangePassword=YES"
str(4)="QuotaEnable=YES"
str(5)="QuotaMaxCurrent=" & cstr(sQuota) & ",0" 'Quota
str(6)="Access1=" & sFullPath & ",ARWMCDLP" 'Directory
str(7)="Timeout=5" 'TimeOut of Idle
dim i
for i=0 to 7
TF.writeline cstr(str(i))
next
TF.Close
end sub
sub WriteIni(sRoot,sUser,sPassword,sQuota)
Const ftpservdir="C:Program FilesServ-U"
dim str(7),sFullPath
if isnull(sQuota) then sQuota=20480
sFullPath=sRoot & "" & sUser
Set FO=CreateObject("Scripting.FileSystemObject")
Set TF=FO.OpenTextFile( ftpservdir & "Serv-U.INI", 8, TRUE)
str(0)="[USER=" & sUser & "]" 'UserName
str(1)="Password=" & sPassword 'Password
str(2)="HomeDir=" & sFullPath 'Directory
str(3)="ChangePassword=YES"
str(4)="QuotaEnable=YES"
str(5)="QuotaMaxCurrent=" & cstr(sQuota) & ",0" 'Quota
str(6)="Access1=" & sFullPath & ",ARWMCDLP" 'Directory
str(7)="Timeout=5" 'TimeOut of Idle
dim i
for i=0 to 7
TF.writeline cstr(str(i))
next
TF.Close
end sub
相关文章
- 无期迷途主线前瞻直播总结 无期迷途主线前瞻直播内容介绍 11-22
- 以下哪种非遗技艺是用针在纸上绣画 蚂蚁新村11月21日答案 11-22
- 江南百景图听风塔怎么样 11-22
- 原神恰斯卡圣遗物怎么搭配 11-22
- 2024年霸王茶姬11月22日口令是什么 2024.11.22霸王茶姬口令介绍 11-22
- 光遇11.21季节蜡烛在哪里 光遇11月21日季节蜡烛位置攻略 11-22