domain .tw idv.tw .com.tw
你正在閱覽 :: 繁體中文:: 學習 ASP SQL VB HTML code

學習 .ASP SQL HTML XML CSS JAVA Perl code study
English Chinese_Traditional Chinese_Simplified

你正在閱覽 :: 繁體中文 Chinese_Traditional

學習.主題:
首頁
ASP
. Active-Server-Flash
. Array
. Connection
. Count
. Counter
. Distinct
. Email
. File
»Create
»delete
»File-obj-Count
»Move
»ReadAll-ReadLine
»Server.MapPath
. Folder
. Function
. GetSQLserver
. Header
. mySQL
. Record
. Recordset
. Request
. Response
. Server
. Server-CreateObject
. ServerVariables
. Session
. Special-Symbols
. String
. Sub
. Time
CSS
Ecommerce
HTML
InternetProtocol
JAVA
Microsoft
Robots
SearchEngine
SQL
SQLserver
VBscript
XML

SiteMap

3w....學習.教學 > ASP > file » delete

3w learning

file >
delete

Title:

to delete an exist file (can be .txt .asp .php .jpg .pl ...any file)


刪除一已經確認存在的檔案
Description:

To delete a file " a.txt " Set fso=Server.CreateObject("Scripting.FileSystemObject") often be used Path : identify the root on server FileExists : to make sure the file is exist , or it will not working fine


Set fso=Server.CreateObject("Scripting.FileSystemObject") 
常被使用在檔案與資料夾的呼叫

Path : 可幫助束記資料主機路逕

FileExists : 確認是否存在後才執行是不可缺保障檢查,免得出現錯誤訊息
Example Code:

<% dim fso Set fso=Server.CreateObject("Scripting.FileSystemObject") Path="c:\myWebDir\" if fso.FileExists(Path&"a.txt") then fso.DeleteFile(Path&"a.txt") end if set fso=nothing %>


刪除一個若存在的檔案
(注意: 這理不是資料夾)
(若要查folder 資料夾可到 ASP>Folder)
Example Result:


if the a.txt exists then will be deleted if not exisits then do nothing


如果 a.txt 存在, 則刪除此檔案
若不存在, 則略過
..
...
...

[ 8/20/2008 ]

www learning school add more scripts and tips memo
You are at >>3WT.EZER.COM >> 3WT.EZER.COM/ASP/FILE/DELETE.ASP>>ASP
Helpful link:: SEO web tools :: Live PR | SERP checker
back to top Ezer code adding :: Questions ;email