by Leo Scaturro (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 24th December 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Delete all forms in an internet directory that are 30 days old
API Declarations
'This program runs on a scheduling program that deletes all forms from a
'directory on the internet server 30 days old.
'We keep forms for reference.
'We use to do this by hand.
'----------------------------------------------------------------------
'Programmer: Leo Scaturro
'Comments: This will delete/clean out all forms from wrpppi01 intranet
' server 30 days old or older.
'Date: 09/19/2000
'----------------------------------------------------------------------
Dim MyPath As String
Dim MyName As String
Dim fdate
MyPath = "\\WRPPPI02\NET2\INETPUB\WWWROOT\FORMS2\temp\*.htm" ' Set the path.
MyName = Dir(MyPath) ' Retrieve the first entry.
Do While MyName <> "" ' Start the loop.
fdate = FileDateTime("\\WRPPPI02\NET2\INETPUB\WWWROOT\FORMS2\temp\" & MyName)
If CVDate(Trim(Left(fdate, InStr(1, fdate, " ")))) < Date - 30 Then Kill MyPath
MyName = Dir
Loop
End Function