-
Deleting files in VB
I want to delete some files based on some criteria.
I am using Dir() command to get the file name. I am checking the file name and deleting that file by Kill statement. But I can not use Dir() statement recursively.
1. Can U suggest optimized code for writing all the filenames in a directory into array.
Can I give a file some life time?. I mean to ask is when we create a file, Is there any option to delete it automatically after exactly a month.
I expect help from all U code gurus,
Ravi Sangisetti
Sr.Software Engineer
Contech India Ltd
Gandinagar, India
-
Re: Deleting files in VB
Instead of using the VB Dir command, I suggest that you use the FindFirstFile and FindNextFile windows API calls. These work similiar to the Dir command, but they have the added benefit of being recursive.
-
Re: Deleting files in VB
Instead of using the VB Dir command, I suggest that you use the FindFirstFile and FindNextFile windows API calls. These work similiar to the Dir command, but they have the added benefit of being recursive.