Link to home
Start Free TrialLog in
Avatar of IT_Group1
IT_Group1Flag for Israel

asked on

Looking for basic script to delete files older than 14 days

With a minimum complexity, which will be able to run as a scheduled task.
I've found this one:
http://gallery.technet.microsoft.com/scriptcenter/Delete-files-older-than-x-13b29c09/view/Discussions#content

which looks good, but maybe a bit of an overkill to the basic functionality which we need; only delete all files in a specific network share which are older than 14 days (or any given number of days).

Thanks
SOLUTION
Avatar of Alan Hardisty
Alan Hardisty
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of IT_Group1

ASKER

Amazing tool. Thanks bro
Did you try any of the other proposed solutions?
Nope, the tool did the job well
Great - remind me to not bother helping you in future.

Alan
Alan, that's not the way to go.
We've looked for an EASY way, preferably a tool which does the deletion.
Please don't take it personally.
My command in batch file setup to run automatically on a regular basis works just as well - I use it on a dozen computers we support.
I'm sure, again nothing personal
I'm sure its nothing personal, but what you are doing by ignoring the people who post first and then awarding points to a solution posted afterwards without even giving an assisted solution to the other posts means that the Experts whose posts you ignore, may well ignore you in the future, which won't help you long term.

You asked for a simple script - which I gave you.

The accepted post wasn't even posted the same day, so you seem to have just started at the bottom of the post, found that it worked and closed the question.  You even acknowledge that you didn't even try the other solutions - hence why should I bother helping you in the future, when you completely ignore my help, which I know works and answers your question.

If you had split the points, having tried the solutions and decided which one was better, then I wouldn't be commenting.

Alan
Agreed,
I've asked to re-open the question and split the points.

Thank you for bringing this issue to my attention.
Thank you - I'm not worried about the points - as you can see I have quite a few, it is more a case of politeness and etiquette that I'm trying to convey, hopefully in a non-aggressive way.

It will help you in the future if you work from the top down in a question and ideally try all the proposed solutions (assuming you get more than one).  If one works and the others don't then awarding all the points to the one that works is a perfectly valid way to close the question.

If several work and you prefer one more than the other, then a split is a perfectly acceptable way to close the question with the 'Best' answer being awarded the lions share of the points, or a 50/50 split - it's your call as they are your points.

Best wishes

Alan
Alan, again - I couldn't agree more.
Thanks for the effort !

BR
Nir
You are welcome.

See you in another question sometime!!

Alan
Thank you all guys.
Nir