Hi,
I've had a search on the forum, but haven't been able to find anything that helps me work out what code I need to write to delete folders that will always appear in a set location for instance:
\\prdfs02\devimages\
The folders that sit under this will always have the following format as their name "yyyymmdd".
What I would like to be able to do is to write some code that will delete folders that are over 6 months old and all their contents.
The following is the code I have written so far, but have now got struck, any assistance would be greatfully received:
===========
BEGIN CODE
===========
Public Function Delete_Folders()
Dim FSO As FileSystemObject ' Declares the File System Object
Dim Folder As Folder 'Declares the Folder Object
Dim ImagePath ' Declares the ImagePath variable
' Set the image path here [the location where images are be stored]
ImagePath = "\\prdfs02\devimages\"
End Function
===========
END CODE
===========
John
I've had a search on the forum, but haven't been able to find anything that helps me work out what code I need to write to delete folders that will always appear in a set location for instance:
\\prdfs02\devimages\
The folders that sit under this will always have the following format as their name "yyyymmdd".
What I would like to be able to do is to write some code that will delete folders that are over 6 months old and all their contents.
The following is the code I have written so far, but have now got struck, any assistance would be greatfully received:
===========
BEGIN CODE
===========
Public Function Delete_Folders()
Dim FSO As FileSystemObject ' Declares the File System Object
Dim Folder As Folder 'Declares the Folder Object
Dim ImagePath ' Declares the ImagePath variable
' Set the image path here [the location where images are be stored]
ImagePath = "\\prdfs02\devimages\"
End Function
===========
END CODE
===========
John