<% 
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. SpringMVC 的重定向时,参数非法问题

    在重定向时,携带的参数出现非法 /shopping/editShippingAddressCart?cs=0eaa49d6-9c6e-4d02-85d0-40c3c7939207|ef9d80b1-7 ...

  2. app/desktop/view/index.html 显示授权标识

    app/desktop/view/index.html 显示授权标识

  3. js 技巧

    用于浮窗跳转至父窗口 parent.document.location.href='/xxx/xxx.htm'; 取父窗口的元素 window.parent.$('#xxx'); 正常跳转 windo ...

  4. oracle 导入sql中文乱码(转)

    导入sql的有中文,直接在linux环境下进行复制粘贴的,发现进去的都是乱码, 修改如下: 进入oracle用户,#vi /home/oracle/.bash_profile; 在最后一行添加:exp ...

  5. margin的auto的理解

    auto 总是试图充满父元素 margin有四个值: All the margin properties can have the following values: auto - the brows ...

  6. Android中的Glide加载图片

    注意:在Android Studio的项目的build.gradle中添加: compile 'com.github.bumptech.glide:glide:3.6.1' 然后同步一下 目录: 使用 ...

  7. Servlet详解

    原文出处:http://blog.csdn.net/q547550831/article/details/50458456 Servlet详解 基本概述 Session在计算机中,尤其是在网络应用中, ...

  8. jQuery.on() 函数详解[http://www.365mini.com/page/jquery-on.htm]

    中文手册 2014年09月01日 暂无评论 on()函数用于为指定元素的一个或多个事件绑定事件处理函数. 此外,你还可以额外传递给事件处理函数一些所需的数据. 从jQuery 1.7开始,on()函数 ...

  9. c语言-扑克牌小魔术

    /************************************* Copyright(C) 2004-2005 vision,math,NJU. File Name: guess_card ...

  10. 如何在MFC中启动其它的(.exe)可执行文件

    ShellExecute(NULL,   "open",   "http://www.sina.com.cn",   NULL,   NULL,   SW_SH ...