A sample file would look like this:
Code: Select all
Directory of Y:\Tom\Program Integration
15/09/2010 06:44 AM 2,523,556 GF (1).avi
15/09/2010 06:45 AM 58,323,282 GF (10).avi
15/09/2010 06:45 AM 34,318,466 GF (11).avi
15/09/2010 06:45 AM 993,988 GF (12).avi
15/09/2010 06:45 AM 17,037,976 GF (13).avi
15/09/2010 06:45 AM 668,494 GF (14).avi
15/09/2010 06:45 AM 33,422,756 GF (15).avi
15/09/2010 06:45 AM 21,128,992 GF (16).avi
15/09/2010 06:45 AM 23,537,194 GF (17).avi
15/09/2010 06:45 AM 20,266,966 GF (18).avi
15/09/2010 06:46 AM 28,177,226 GF (19).avi
15/09/2010 06:44 AM 19,919,346 GF (2).avi
15/09/2010 06:44 AM 18,056,900 GF (3).avi
15/09/2010 06:44 AM 2,690,740 GF (4).avi
15/09/2010 06:44 AM 39,466,326 GF (5).avi
15/09/2010 06:44 AM 47,864,220 GF (6).avi
15/09/2010 06:45 AM 32,951,816 GF (7).avi
15/09/2010 06:45 AM 18,330,400 GF (8).avi
15/09/2010 06:45 AM 39,266,124 GF (9).avi
19 File(s) 458,944,768 bytes
Directory of Y:\Tom\Program Integration\KNOWLEDGE MGMT\
11/08/2010 09:02 AM 28,177,226 (FR).avi
11/08/2010 09:02 AM 20,185,404 Labels (FR) .avi
09/08/2010 12:18 PM 39,266,124 Labels .avi
3 File(s) 28,198,284 bytes
so i need this to be at the bottom
the script that selects the values i need and appends it to the end of the file looks like this:
Code: Select all
for /f "tokens=2*" %%a in ('findstr /c:"File(s)" "THEFILE.txt"') do (
for /f "tokens=2 delims=\" %%c in ("%%b") do -
Echo %%b
) >> THEFILE.txt
I just need to loop it so it does this to all my files in the directory. In the end all text files will have similar results at the bottom.
Any ideas?