grouping list of files
Posted: Thu Sep 11, 2008 10:25 pm
Hi there!
I've got this list of files (simple dir /s /b > list.txt in command prompt)
Now I need to group them by subdirectory.
here's a small example:
Winter2008_2009
zomer2009
Winter2008_2009\Bijzonderetassen
Winter2008_2009\Damesmode
Winter2008_2009\Bijzonderetassen\L1000405.JPG
Winter2008_2009\Bijzonderetassen\L1000406.JPG
Winter2008_2009\Bijzonderetassen\L1000407.JPG
Winter2008_2009\Bijzonderetassen\L1000408.JPG
Winter2008_2009\Bijzonderetassen\L1000409.JPG
Winter2008_2009\Bijzonderetassen\L1000410.JPG
Winter2008_2009\Bijzonderetassen\L1000411.JPG
Winter2008_2009\Damesmode\Bandje
Winter2008_2009\Damesmode\hakje
Winter2008_2009\Damesmode\Bandje\L1000317.JPG
Winter2008_2009\Damesmode\Bandje\L1000519.JPG
Winter2008_2009\Damesmode\Bandje\L1000563.JPG
Winter2008_2009\Damesmode\Bandje\L1000739.JPG
Winter2008_2009\Damesmode\hakje\L1000363.JPG
Winter2008_2009\Damesmode\hakje\L1000364.JPG
Winter2008_2009\Damesmode\hakje\L1000426.JPG
Winter2008_2009\Damesmode\hakje\L1000427.JPG
Winter2008_2009\Damesmode\hakje\L1000634.JPG
What I now need is actually a group of output files with in each file ONLY the JPG's with relative path.
So that would be a file containing :
Winter2008_2009\Bijzonderetassen\L1000405.JPG
Winter2008_2009\Bijzonderetassen\L1000406.JPG
Winter2008_2009\Bijzonderetassen\L1000407.JPG
Winter2008_2009\Bijzonderetassen\L1000408.JPG
Winter2008_2009\Bijzonderetassen\L1000409.JPG
Winter2008_2009\Bijzonderetassen\L1000410.JPG
Winter2008_2009\Bijzonderetassen\L1000411.JPG
and a file containing
Winter2008_2009\Damesmode\Bandje\L1000317.JPG
Winter2008_2009\Damesmode\Bandje\L1000519.JPG
Winter2008_2009\Damesmode\Bandje\L1000563.JPG
Winter2008_2009\Damesmode\Bandje\L1000739.JPG
and so on and so on.
When I have those files I need to convert these paths and files to HTML code, but we'll see that when we get there.
I've tried something with 'jpg' [mustendwith (cr or lf)], but that just selected the 'JPG' part, not the whole line.
The idea was to insert something like "####" at the beginning of the line and then delete all the lines not starting with "####" but now that I read this back, it is in fact the same as deleting all the lines not ending in "JPG"... oh my I start to sound incoherent.
Bottom line: how can I remove at least the lines that contain just the subdir path and not a filename ending with JPG, and is it possible to split them up into different output files?
hope to hear soon,
Eelco
Oh, I purchased TextPipe Lite Single User, so I think all the Pro options are out of my reach...
I've got this list of files (simple dir /s /b > list.txt in command prompt)
Now I need to group them by subdirectory.
here's a small example:
Winter2008_2009
zomer2009
Winter2008_2009\Bijzonderetassen
Winter2008_2009\Damesmode
Winter2008_2009\Bijzonderetassen\L1000405.JPG
Winter2008_2009\Bijzonderetassen\L1000406.JPG
Winter2008_2009\Bijzonderetassen\L1000407.JPG
Winter2008_2009\Bijzonderetassen\L1000408.JPG
Winter2008_2009\Bijzonderetassen\L1000409.JPG
Winter2008_2009\Bijzonderetassen\L1000410.JPG
Winter2008_2009\Bijzonderetassen\L1000411.JPG
Winter2008_2009\Damesmode\Bandje
Winter2008_2009\Damesmode\hakje
Winter2008_2009\Damesmode\Bandje\L1000317.JPG
Winter2008_2009\Damesmode\Bandje\L1000519.JPG
Winter2008_2009\Damesmode\Bandje\L1000563.JPG
Winter2008_2009\Damesmode\Bandje\L1000739.JPG
Winter2008_2009\Damesmode\hakje\L1000363.JPG
Winter2008_2009\Damesmode\hakje\L1000364.JPG
Winter2008_2009\Damesmode\hakje\L1000426.JPG
Winter2008_2009\Damesmode\hakje\L1000427.JPG
Winter2008_2009\Damesmode\hakje\L1000634.JPG
What I now need is actually a group of output files with in each file ONLY the JPG's with relative path.
So that would be a file containing :
Winter2008_2009\Bijzonderetassen\L1000405.JPG
Winter2008_2009\Bijzonderetassen\L1000406.JPG
Winter2008_2009\Bijzonderetassen\L1000407.JPG
Winter2008_2009\Bijzonderetassen\L1000408.JPG
Winter2008_2009\Bijzonderetassen\L1000409.JPG
Winter2008_2009\Bijzonderetassen\L1000410.JPG
Winter2008_2009\Bijzonderetassen\L1000411.JPG
and a file containing
Winter2008_2009\Damesmode\Bandje\L1000317.JPG
Winter2008_2009\Damesmode\Bandje\L1000519.JPG
Winter2008_2009\Damesmode\Bandje\L1000563.JPG
Winter2008_2009\Damesmode\Bandje\L1000739.JPG
and so on and so on.
When I have those files I need to convert these paths and files to HTML code, but we'll see that when we get there.
I've tried something with 'jpg' [mustendwith (cr or lf)], but that just selected the 'JPG' part, not the whole line.
The idea was to insert something like "####" at the beginning of the line and then delete all the lines not starting with "####" but now that I read this back, it is in fact the same as deleting all the lines not ending in "JPG"... oh my I start to sound incoherent.
Bottom line: how can I remove at least the lines that contain just the subdir path and not a filename ending with JPG, and is it possible to split them up into different output files?
hope to hear soon,
Eelco
Oh, I purchased TextPipe Lite Single User, so I think all the Pro options are out of my reach...