Deleting txt files after some time

  • Hi

    I am looking for some sample code to delete txt files in DTS using Vb script.

    The files are named like MoneyStatistics_2002_02.txt etc.. These txt files will be periodically extracted onot harddisk. Everytime the DTS package is executed the txt files will be checked against a variable containing number of months and if exceeding the files will be deleted.

    I need some information to check the file name and then delete the file.

    Any ideas?

    mipo

  • Use FileSystem object to do this. It has a deletefile method. For more info and a basic example see MSND Library online at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/jsmthdeletefile.asp

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply