asp實現(xiàn)檢查目錄是否存在與建立目錄的函數(shù)
更新時間:2007年09月01日 22:15:29 作者:
'-------------------------
'--檢查目錄是否存在
'----------------------
Function CheckDir(byval FolderPath)
dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(Server.MapPath(folderpath)) then
'存在
CheckDir = True
Else
'不存在
CheckDir = False
End if
Set fso = nothing
End Function
'-------------------------
'--建立目錄
'----------------------
Function MakeNewsDir(byval foldername)
dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
fso.CreateFolder(Server.MapPath(foldername))
If fso.FolderExists(Server.MapPath(foldername)) Then
MakeNewsDir = True
Else
MakeNewsDir = False
End If
Set fso = nothing
End Function
'--檢查目錄是否存在
'----------------------
Function CheckDir(byval FolderPath)
dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(Server.MapPath(folderpath)) then
'存在
CheckDir = True
Else
'不存在
CheckDir = False
End if
Set fso = nothing
End Function
'-------------------------
'--建立目錄
'----------------------
Function MakeNewsDir(byval foldername)
dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
fso.CreateFolder(Server.MapPath(foldername))
If fso.FolderExists(Server.MapPath(foldername)) Then
MakeNewsDir = True
Else
MakeNewsDir = False
End If
Set fso = nothing
End Function
相關(guān)文章
asp自動補(bǔ)全html標(biāo)簽自動閉合(正則表達(dá)式)
asp自動補(bǔ)全html標(biāo)簽自動閉合,方便asp截取帶有html標(biāo)簽的內(nèi)容,防止頁面變形2012-10-10asp連接access、sql數(shù)據(jù)庫代碼及數(shù)據(jù)庫操作代碼
asp連接access、sql數(shù)據(jù)庫代碼及數(shù)據(jù)庫操作代碼,需要的朋友可以參考下2012-10-10在ASP中用組件檢測當(dāng)前網(wǎng)卡地址的代碼
在ASP中用組件檢測當(dāng)前網(wǎng)卡地址的代碼...2007-03-03asp將全角的字符轉(zhuǎn)變成半角字符,將半角轉(zhuǎn)變成全角d的代碼
2008-01-01