theniteowl
Programmer
Hi All,
I am working on a VBS script to do automated cleanup of old files that are produced from one of our applications.
I am trying to figure out how to delete files that have their read only property set.
I use Scripting.FileSystemObject to access the drive, loop through all folders in the specified path and test each files last modified date and delete it if it is beyond a specified number of days old.
But if I run into a file set read only it just errors out on me. I have yet to test if files set hidden are an issue also.
Thoughts?
This is for our mainframe print system in the test environment. All test comes out in PDF files which company wide adds up to large amounts of data very quickly for all the different business units so it is important that we be able to automate cleanup of old files.
Thanks.
At my age I still learn something new every day, but I forget two others.
I am working on a VBS script to do automated cleanup of old files that are produced from one of our applications.
I am trying to figure out how to delete files that have their read only property set.
I use Scripting.FileSystemObject to access the drive, loop through all folders in the specified path and test each files last modified date and delete it if it is beyond a specified number of days old.
But if I run into a file set read only it just errors out on me. I have yet to test if files set hidden are an issue also.
Thoughts?
This is for our mainframe print system in the test environment. All test comes out in PDF files which company wide adds up to large amounts of data very quickly for all the different business units so it is important that we be able to automate cleanup of old files.
Thanks.
At my age I still learn something new every day, but I forget two others.