[dba-Tech] Batch script help

Tydda Jon - Slough jon.tydda at lonza.com
Thu Jul 19 04:34:47 CDT 2012

Hi all

I've created a scheduled task to copy local database backup files to a network drive so they get backed up for longer. That bit is easy.

What I really want to do is to limit the folder to the last five backups, so that I'm not filling the file server (and all the hourly snapshots) with old data that won't ever be looked at again.

I've searched for a script to delete the oldest file in a folder, but with no joy - I'm trying to do this with a batch command (Windows 7).

Can anyone help?


This communication and its attachments, if any, may contain confidential and privileged information the use of which by other persons or entities than the intended recipient is prohibited. If you receive this transmission in error, please contact the sender immediately and delete the material from your system.

More information about the dba-Tech mailing list