wilsonkjit
asked on
Require variables for scirpt to delete SQL back-up files older than 30 days
Hi all,
I require a date range or date modified variable for a script that will be designed to delete all files from a folder older than 30 days.
Currently this folder of ours is growing at around 3GB+ a day, so rather than monitoring it every month I would like to schedule a script to do it for us.
I was thinking of using the del command but as it stands I cannot get the syntax correct.
Any help would be appreciated.
Cheers
I require a date range or date modified variable for a script that will be designed to delete all files from a folder older than 30 days.
Currently this folder of ours is growing at around 3GB+ a day, so rather than monitoring it every month I would like to schedule a script to do it for us.
I was thinking of using the del command but as it stands I cannot get the syntax correct.
Any help would be appreciated.
Cheers
Is it the transaction logs that are growing - if so I suggest you read http://support.microsoft.com/kb/873235 before you delete anything !!
ASKER
Thanks for the prompt reply.
The folder in question is not important. It is a folder called "DatabaseBackups" that has been created for quick restore purposes. We currently back the contents of this folder up daily onto tape through Backup Exec, so it is not destructive in removing these files.
In total each day, 4 files are created to the total of 3GB+. .bak & .trm are the largest.
Rest assured it is safe to delete these files =]
The folder in question is not important. It is a folder called "DatabaseBackups" that has been created for quick restore purposes. We currently back the contents of this folder up daily onto tape through Backup Exec, so it is not destructive in removing these files.
In total each day, 4 files are created to the total of 3GB+. .bak & .trm are the largest.
Rest assured it is safe to delete these files =]
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.