VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Delete all forms in an internet directory that are 30 days old

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.

Rate Delete all forms in an internet directory that are 30 days old



'----------------------------------------------------------------------
'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

Download this snippet    Add to My Saved Code

Delete all forms in an internet directory that are 30 days old Comments

No comments have been posted about Delete all forms in an internet directory that are 30 days old. Why not be the first to post a comment about Delete all forms in an internet directory that are 30 days old.

Post your comment

Subject:
Message:
0/1000 characters