dredlelay
11-10-2005, 12:26 PM
I have a text file that looks like this (below). I used the command prompt to list all the files I have on my computer into this text file. Below is just a sample from it. What I'm trying to figure out is how to parse it and extract lines that are older than 3 years from today's date and write to a new file. If anyone can script this for me that would be really great. If not, any direction would be great as well. Thanks so much.
This is what it looks like in the current text file:
-------------------------
Directory of X:\
11/08/2002 05:09 PM <DIR> etc
11/04/2001 12:06 PM <DIR> home
11/01/1995 11:29 AM <DIR> home1
04/07/2000 09:47 AM 41 New Text Document.txt
04/05/2005 01:47 PM Symposium.bak
1 File(s) 41 bytes
Directory of X:\etc
11/08/2005 05:09 PM <DIR> .
05/19/2005 06:15 PM <DIR> ..
11/06/2005 12:00 AM <DIR> log
08/24/2005 05:49 PM <DIR> modules
11/08/2005 05:09 PM 30,878 registry
What I need to accomplish is below:
------------------------------
Directory of X:\
11/08/2002 05:09 PM <DIR> etc
11/04/2001 12:06 PM <DIR> home
11/01/1995 11:29 AM <DIR> home1
04/07/2000 09:47 AM 41 New Text Symposium.bak
1 File(s) 41 bytes
Directory of X:\etc
------------------------------
This is what it looks like in the current text file:
-------------------------
Directory of X:\
11/08/2002 05:09 PM <DIR> etc
11/04/2001 12:06 PM <DIR> home
11/01/1995 11:29 AM <DIR> home1
04/07/2000 09:47 AM 41 New Text Document.txt
04/05/2005 01:47 PM Symposium.bak
1 File(s) 41 bytes
Directory of X:\etc
11/08/2005 05:09 PM <DIR> .
05/19/2005 06:15 PM <DIR> ..
11/06/2005 12:00 AM <DIR> log
08/24/2005 05:49 PM <DIR> modules
11/08/2005 05:09 PM 30,878 registry
What I need to accomplish is below:
------------------------------
Directory of X:\
11/08/2002 05:09 PM <DIR> etc
11/04/2001 12:06 PM <DIR> home
11/01/1995 11:29 AM <DIR> home1
04/07/2000 09:47 AM 41 New Text Symposium.bak
1 File(s) 41 bytes
Directory of X:\etc
------------------------------