1樓:網友
按照你的要求。
在這裡在加個判斷 判斷c:\是否存在 如果存在就執行a命令 不存在就b命令」
set fso=createobject("")if "c:\") then
else if "c:\") then
a命令。else b命令。
end if
end if
向右縮排的部分就是你要的判斷部分啦。
2樓:
set fso=createobject("")if "c:\") then '判斷檔案時,此行 folderexists 改成 fileexists
else **在下面輸入建立此檔案的命令,並寫入資訊 "這是乙個測試。"
set myfile = "c:\", true)"這是乙個測試。")
end if
3樓:雛咲惠知
抄襲樓上的 !!
set fso=createobject("")if "c:\") then
else **在這裡在加個判斷 判斷c:\是否存在 如果存在就執行a命令 不存在就b命令。
if "c:\") then
執行a命令。
else 執行b命令。
end if
end if
關於vbs的時間判斷
4樓:網友
加上1000000萬後再進行判斷。。。
如:1080909<1080910
如何用 vbs 來做時間判斷。
5樓:網友
if hour(time)>=20 and minute(time)>=0 then
msgbox "己經超出時間"
elsemsgbox "時間未到"
end if
vbs 判斷時間怎麼用
6樓:匿名使用者
function open(th) '節約**set ws="")
end function
doselect case time() '選擇time()就是直接到秒你自己看看輸出msgbox就好下面的選擇項純對比。
case "21:30:50"
call open("")
case "21:40:50"
call open("")
case "21:40:51" 』沒事了直接退出end select
900 '900毫秒迴圈一次。
loop這樣子。
7樓:丶我不是本人
set ws = createobject("")dim t(2)
t(0) = cdate("21:00:00")t(1) = cdate("21:
30:50")t(2) = cdate("21:40:
50")if time = t(0) then
elseif time = t(1) then""
elseif time = t(2) then""
elsemsgbox "沒有在時間範圍之內"
end if
vbs怎麼產生0 10的隨機數呀
給你一段簡單的 吧 randomize a int 9 rnd msgbox a vbs是vb的子集 所以共通的 看下下面的函式 你就明白了vb隨機函式 rnd 函式隨即產生一個大於等於0但小於1的單精度浮點數 為了生成某個範圍內的隨機整數,可使用以下公式 int upperbound lowerb...
用vbs遍歷檔案,當遇到受保護的檔案時會提示錯誤,如何解決
改成 on error goto nt 在next 之前加一句 nt 試試 如何用vbs檔案彈出一些錯誤的提示框?msgbox內的buttons引數為16即可 vbs 遍歷文字檔案內容並轉換單位 200 你的vbs程式中,這一句msgbox regex.peplace strline,replstr...
關於SQL語句的批量update的寫法,求解
update 表明 set 列名 要改的值 where id in 陣列裡存的值 如果資料不是很多,估計只能使用for迴圈來實現插入。update tablename set status 1 where id 1 or id 2 or id 3 or id 4 update tablename s...