婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > vbs 定時刪除功能實現代碼

vbs 定時刪除功能實現代碼

熱門標簽:除了地圖標注還有這種生意嗎 齊齊哈爾高德地圖標注店 哪里有便宜的地圖標注公司 東營快遞外呼系統 百度地圖標注點距離代碼 地圖標注政府哪個部門管 如何用機器人進行電銷 神行者美術館地圖標注 佛山真人電銷機器人廠家

參考代碼一:

復制代碼 代碼如下:

Function DeleteLog( )
    Dim objFSO, objFolder, strPath, targetFSO, subFSO, DirPath  
    DirPath = createobject("Scripting.FileSystemObject").GetFile(Wscript.ScriptFullName).ParentFolder.Path"\Log\"
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set targetFSO =  objFSO.GetFolder(DirPath)
    Set subFSO = targetFSO.SubFolders

    For Each subFolder in SubFSO
If DateDiff("d", subFolder.name, date)>3 Then
    strPath = DirPathsubFolder.name
    objFSO.DeleteFolder(strPath)
    End If
    Next
End Function
Call DeleteLog( )
這樣在task Schdeuler里面schedule我的vbs程序就沒有報錯啦。撒花,結貼~~

參考代碼二:

復制代碼 代碼如下:

Dim dqxs, dqrq, szxs, szfz, dqml, datp
Dim jclb
Dim c
dim d
'=========================================================
datp = "F:"
szxs = "7:00:"
wjml = datp "\DVRDat\"
sykj = 20000000000 '20個G
dqml = left(wscript.scriptfullname,instrrev(wscript.scriptfullname,"\")-1)
jclb = "ServicesManager.exe,PD_Server.exe,SpeedServer.exe,CoreServer.exe,DownloadSVC.exe,ManagerConsole.exe,Gptsvr.exe,HintAMProxy.exe,FileServer.exe,CleanDisk.exe,GetNetData.exe,SGUClient.exe,SGUServer.exe,"
set WshShell = WScript.CreateObject("WScript.Shell")
Set fso = Wscript.CreateObject("Scripting.FileSystemObject")
'=========================================================
if fso.GetDrive(datp).FreeSpace sykj then call cprlql
do
    If InStr(time, szxs) > 0 Then
        if fso.GetDrive(datp).FreeSpace sykj then call cprlql
    end if
    WScript.Sleep(60*1000)
loop

getfso=fso.GetFolder("c:\\windows").DateCreated
'===========================================================
Function cprlql
    Dim strline, scml
    WshShell.run "cmd /c dir " wjml " /ad /b /tc>c:\dir.log",0
    if fso.FileExists("c:\dir.log") then
        Set objFile = fso.OpenTextFile("c:\dir.log")                
        do until objFile.atendofstream
            strline = objFile.readline
            scml = wjml strline
            WshShell.run "cmd /c rd /s /q " scml,0
            for i = 1 to 20
                if fso.GetDrive(datp).FreeSpace > sykj then exit Function
                if fso.FolderExists(scml) then
                    WScript.Sleep(1000)
                else
                    exit for
                end if
            next
            if fso.GetDrive(datp).FreeSpace > sykj then exit Function
        loop
    end if
End Function

您可能感興趣的文章:
  • php定時刪除文件夾下文件(清理緩存文件)
  • 使用mysql事件調度器定時刪除binlog
  • 使用vbs腳本定時刪除N天前的文件
  • Windows和Linux下定時刪除某天前的文件的腳本
  • Shell定時刪除指定時間之前的文件
  • 定時刪除一個文件夾內的所有子文件夾和文件的方法

標簽:湖州 西安 文山 鶴壁 海口 四平 銅川 邢臺

巨人網絡通訊聲明:本文標題《vbs 定時刪除功能實現代碼》,本文關鍵詞  vbs,定時,刪除,功能,實現,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《vbs 定時刪除功能實現代碼》相關的同類信息!
  • 本頁收集關于vbs 定時刪除功能實現代碼的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 三门峡市| 乌鲁木齐县| 太谷县| 牟定县| 民勤县| 宝清县| 河西区| 周宁县| 娄烦县| 赣州市| 沧州市| 固始县| 台南县| 北票市| 宝兴县| 西平县| 宝清县| 成安县| 汽车| 莱阳市| 盈江县| 南涧| 共和县| 贵南县| 舞钢市| 怀化市| 澄城县| 江孜县| 高安市| 比如县| 邹城市| 怀宁县| 邻水| 忻城县| 平遥县| 宜兰县| 合阳县| 静安区| 教育| 正安县| 滦南县|