濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > asp結(jié)合fso實(shí)現(xiàn)文件或文件夾創(chuàng)建刪除等操作的函數(shù)

asp結(jié)合fso實(shí)現(xiàn)文件或文件夾創(chuàng)建刪除等操作的函數(shù)

熱門(mén)標(biāo)簽:地圖標(biāo)注還可以做嗎 高質(zhì)量的電銷(xiāo)外呼系統(tǒng) 宿州防封外呼系統(tǒng)平臺(tái) 電銷(xiāo)機(jī)器人采購(gòu) 友邦互聯(lián)電銷(xiāo)機(jī)器人違法嗎 無(wú)營(yíng)業(yè)執(zhí)照地圖標(biāo)注教學(xué) 外呼系統(tǒng)怎么話費(fèi) 硅基電話機(jī)器人加盟 滴滴地圖標(biāo)注上車(chē)點(diǎn)
'////////////////////////////////////////////////FSO操作/////////////////////////////////////
'判斷文件夾是否存在
Function FolderExits(Folder)
Folder=Server.Mappath(Folder)
Set FSO= Server.CreateObject("Scripting.FileSystemObject")
IF FSO.FolderExists(Folder) Then
   FolderExits=true
Else
   FolderExits=false
End IF 
End Function

'判斷文件是否存在
Function FileExits(FileName)
FileName=Server.Mappath(FileName)
Set FSO= Server.CreateObject("Scripting.FileSystemObject")
IF FSO.FileExists(FileName) Then
   FileExits=true
Else
   FileExits=false
End IF 
End Function

'創(chuàng)建文件夾
Function CreateFolder(Folder)
on error resume next
Folder=Server.Mappath(Folder)
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
FSO.CreateFolder(Folder)
if err>0 then 
  err.clear
  CreateFolder=False
else 
  CreateFolder=True
end if 
End function

'創(chuàng)建文件
Function CreateFile(FileName,Content)
on error resume next
FileName=Server.Mappath(FileName)
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
set fd=FSO.createtextfile(FileName,true)
fd.writeline Content
if err>0 then 
  err.clear
  CreateFile=False
else 
  CreateFile=True
end if 
End function

'刪除文件
function DeleteFile(FileName)
on error resume next 
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
if FSO.FileExists(FileName) then 
  FSO.DeleteFile FileName,true
end if
if err>0 then 
  err.clear
  DeleteFile=False
else 
  DeleteFile=True
end if 
end function 

'刪除文件夾
function DeleteFolder(Folder)
on error resume next 
Folder=server.MapPath(Folder)
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
if FSO.FolderExists(Folder) then 
  FSO.Deletefolder Folder,true
end if
if err>0 then 
  err.clear
  Deletefolder=False
else 
  Deletefolder=True
end if 
end function 
您可能感興趣的文章:
  • asp fso操作類(lèi)
  • asp下利用fso實(shí)現(xiàn)文件夾或文件移動(dòng)改名等操作函數(shù)
  • 使用FSO修改文件夾的名稱實(shí)現(xiàn)文件轉(zhuǎn)移防盜鏈
  • fso asp生成靜態(tài)html的代碼
  • ASP+FSO可視化目錄編歷(可增、刪、改)下載
  • asp下用ADODB.Stream代替FSO讀取文本文件
  • 設(shè)置FSO權(quán)限功能的說(shuō)明
  • ASP FSO文件操作函數(shù)代碼(復(fù)制文件、重命名文件、刪除文件、替換字符串)

標(biāo)簽:儋州 新余 七臺(tái)河 宣城 錫林郭勒盟 雅安 江門(mén) 廣元

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《asp結(jié)合fso實(shí)現(xiàn)文件或文件夾創(chuàng)建刪除等操作的函數(shù)》,本文關(guān)鍵詞  asp,結(jié)合,fso,實(shí)現(xiàn),文件,或,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《asp結(jié)合fso實(shí)現(xiàn)文件或文件夾創(chuàng)建刪除等操作的函數(shù)》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于asp結(jié)合fso實(shí)現(xiàn)文件或文件夾創(chuàng)建刪除等操作的函數(shù)的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    杭锦后旗| 赤城县| 安溪县| 夏河县| 宁明县| 汝南县| 临猗县| 白沙| 呼玛县| 青冈县| 拜泉县| 清水河县| 城口县| 齐河县| 桑植县| 潼南县| 沙田区| 新和县| 奇台县| 大荔县| 丽江市| 宾川县| 汝城县| 太仓市| 霍林郭勒市| 怀集县| 茌平县| 锡林浩特市| 江源县| 万山特区| 营山县| 宝应县| 旅游| 邵阳市| 奎屯市| 文登市| 定日县| 突泉县| 休宁县| 青冈县| 城步|