Delete Specified Files N Number Of Days Old

Category:
Files and Directories
Type:
Applications
Difficulty:
Beginning

Author: Vivek Nigam

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This application will to delete all type of files N number of days old from today’s date or the data supplied by the user. It will also set the file Attributes before deletion, if file having Read Only Attributes, application will set normal Attributes before deletion. This application will also store the result in ArielTempFileResult.log file, you can see this log file in your application path, It will also create error log file if any error occur when user run the application file name DelArielTmpErrFile.log, this file will also created in the same location(Application Path) . The best way to run this application is to create the Exe and pass the specified parameters. DeleteArielTempFiles.exe lngDaysOld, strFileSpec, strComparisonDate e.g DeleteArielTempFiles.exe 2, strFileSpec, strComparisonDate lngDaysOld = Number of Days you want to delete files. strFileSpec = "C:\Temp\ForDelFileTestProgram\*.tmp" strComparisonDate = By default is Now – You can pass any days. Note: Before use this application you have to be very clear what this code and application is going to do, Owner of this code is not at all responsible for any damage and any kind of file deletion by user.

Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.

Download miscdeletefilesafterdate.zip