[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Creating batch file to delte text files

Asked by Fredy992 in Microsoft Operating Systems, Microsoft Development, Automation

Tags: Microsoft Windows

I have a folder which contains several text files with different names. These files are generated everyday with the server's current date. I have these files for example: "CLIENT_20091029.txt", "CLIENT_20091030.txt", "CLIENT_20091031.txt", "CLIENT_20091101.txt", "CLIENT_20091102.txt", "CLIENT_20091103.txt", "CLIENT_20091104.txt". I need to create a batch file (.bat) to delete all files with the date of 5 days old from current date. I need to keep only the file which are not more then 5 days old. So using the files I mentioned as example the batch file will delete the files with the dates 20091029 and 20091030 and keep the others. How do I do this with a batch file ?
[+][-]11/04/09 04:27 AM, ID: 25738605Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/04/09 04:32 AM, ID: 25738632Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/04/09 04:53 AM, ID: 25738769Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/04/09 05:38 AM, ID: 25739120Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/04/09 05:44 AM, ID: 25739173Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/04/09 06:47 AM, ID: 25739791Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/04/09 08:14 AM, ID: 25740812Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/04/09 03:01 PM, ID: 25745030Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625