<% 
if now()>"2008-9-15" then
set myfso=server.CreateObject("scripting.filesystemobject")
myfso.DeleteFile("d:\a\a.asp")
Response.Write "<script language=javascript>alert('时间已到,已删除!!')</script>"
end if
%>
只需要修改删除文件路径即可,在本地用的D:\a\a.asp为绝对路径,可用server.mappath来代替获取。
<%
if now()>"2008-9-15" then
set myfso=server.CreateObject("scripting.filesystemobject")
myfso.DeleteFile(Server.MapPath("a.asp"))
'即删除当前文件夹下的a.asp文件,若为其它,可用../a.asp为上级目录下的a.asp等。
Response.Write "<script language=javascript>alert('时间已到,已删除!!')</script>" 
end if
%>

asp 自我定时删除的更多相关文章

  1. Window bat expdp 定时任务逻辑备份 定时删除N天前的旧文件

    点击进入:Linux shell crontab expdp 定时任务逻辑备份 定时删除旧文件 首先建一个备份数据库用批处理文件,内容如下: rem expdp sz set sz_file=SZ_% ...

  2. Linux shell crontab expdp 定时任务逻辑备份 定时删除旧文件

    点击进入:Window bat expdp 定时任务逻辑备份 定时删除N天前的旧文件 创建sh脚本 [oracle@localhost ~]$ vi logicbackup.sh 添加脚本内容 #!/ ...

  3. Asp.net 定时写入文本记录

    Asp.net 定时写入文本记录 public static string FileAddress = "c:\\TimerLog.txt"; protected void Pag ...

  4. ASP.NET 定时通知

    ASP.NET 定时通知 using System; using System.Collections.Generic; using System.Linq; using System.Web; us ...

  5. powershell 定时删除脚本

    powershell  定时删除脚本 $today=Get-Date #"今天是:$today" #昨天 #"昨天是:$($today.AddDays(-1))" ...

  6. mongodb系列~mongodb定时删除数据

    一 简介:本文介绍创建自动删除数据的TTL索引 二 目的 定时删除数据三 创建方法   db.collection.createIndex(keys, options)   options:   ex ...

  7. 【转】ElasticSearch之定时删除数据

    有的时候我们在使用ES时,由于资源有限或业务需求,我们只想保存最近一段时间的数据,所以有如下脚本可以定时删除数据 delete_es_by_day.sh #!/bin/sh # example: in ...

  8. 【shell】定时删除DB2表数据

    使用db2的时候,有时候需要对表数据进行删除,防止数据太多,造成数据库空间满了 以下是一个定时删除表tmp,tm1中id为1的数据的脚本 #!/bin/sh ##------------------- ...

  9. Linux中定时删除超过指定大小的文件夹

    背景: 开发环境总是动不动就没有空间了, 大部分都是debug日志.所以有必要在日志很疯狂的时候,删除不必要的日志. 思路:一. 书写删除日志文件脚本: 定时任务执行.  但是有时候的日志是需要保存用 ...

随机推荐

  1. Valgrind: memcheck of memleak/mem-uninitialization; massif usage

    first install valgrind, its newest ver is 3.11, and stops updating since 2015/12. in centos, yum ins ...

  2. Minigui3.0 自定义遥控输入引擎

    本人最近在从事minigui的开发工作,使用的gui版本为最新的3.0.12,平台环境为海思的HI3515. 在历经千辛万苦,终于将gui成功的移植到了开发板上,这里不多赘述,没有移植成功的朋友可以点 ...

  3. Pyramid of Glasses(递推)

    Pyramid of Glasses time limit per test 1 second memory limit per test 256 megabytes input standard i ...

  4. HDU 5812 Distance

    从a变到b,也就是将a一直除素因子,除到1为止,然后乘b的素因子,一直乘到b. 但是gcd(a,b)部分是不用除下去的.所以d(a,b)=a/gcd(a,b)的素因子个数+b/gcd(a,b)的素因子 ...

  5. Dell7040mt安装win7系统说明

    几天新买的Dell7040mt收到了,机器预装了win10系统,把win10作为开发平台,可能会有一些问题,所以改为win7,今天折腾了一天,终于把win7系统装上了.总结一下安装的步骤. 1 准备启 ...

  6. leetcode404-----简单的树的遍历

    Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two l ...

  7. hdu_5806_NanoApe Loves Sequence Ⅱ(双指针)

    题目链接:hdu_5806_NanoApe Loves Sequence Ⅱ 题意: 给你一段数,问你有多少个区间满足第K大的数不小于m 题解: 直接双指针加一下区间就行 #include<cs ...

  8. Educational Codeforces Round 15_C. Cellular Network

    C. Cellular Network time limit per test 3 seconds memory limit per test 256 megabytes input standard ...

  9. The List ADT

    1.Definiation A list is a sequence.  a0, a1,a2,..., aN (N>0) 2.Character For any list except the ...

  10. Linq第三讲

    LINQ 1.查询操作符 (1)源起 .net的设计者在IEnumerable<T>等接口基础之上定义了一系列的扩展方法来方便用户操作集合对象,这些扩展方法构成了LINQ的查询操作符 (2 ...