command-line โ€“ Sathya's World
Batch file to delete files older than x days
· โ˜• 2 min read · โœ๏ธ Sathyajith Bhat
At work, I have bunch of batch files which take an export from Oracle database, compress them and move them to their respective folders. In addition to this, the scripts also copy the Oracle forms executibles (“fmx”), reports (“rdf”) and other miscellaneous files to the backup locations and these are further compressed. The compressed files are then transferred over to theย SAN. Now the problem was that these backup files would still remain on the hard drive, littering the folders and resulting in waste of space - I was looking for an alternative to get rid of these files via a scripted approach.