Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    May 2001
    Location
    Wellington
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Parse dir output (any)

    Has anyone had to do any parsing of a directory listing (dir) output file?

    What I'm after is a way to translate a dir that looks like this:

    Volume in drive D is Data
    Volume Serial Number is CC0B-BE98

    Directory of D:example

    21/02/2002 11:39 <DIR> .
    21/02/2002 11:39 <DIR> ..
    21/02/2002 11:42 <DIR> examplesub1
    21/02/2002 11:43 <DIR> examplesub2
    21/02/2002 11:38 0 main.txt
    1 File(s) 0 bytes

    Directory of D:exampleexamplesub1

    21/02/2002 11:42 <DIR> .
    21/02/2002 11:42 <DIR> ..
    21/02/2002 11:40 <DIR> examplesubsub1
    21/02/2002 11:39 0 subtext1.txt
    1 File(s) 0 bytes

    Directory of D:exampleexamplesub1examplesubsub1

    21/02/2002 11:40 <DIR> .
    21/02/2002 11:40 <DIR> ..
    21/02/2002 11:40 0 random1.txt
    21/02/2002 11:40 0 random2.txt
    21/02/2002 11:39 0 subsubtext1.txt
    3 File(s) 0 bytes

    Directory of D:exampleexamplesub2

    21/02/2002 11:43 <DIR> .
    21/02/2002 11:43 <DIR> ..
    21/02/2002 11:40 0 what1.txt
    21/02/2002 11:39 0 what2.txt
    2 File(s) 0 bytes

    Total Files Listed:
    7 File(s) 0 bytes
    11 Dir(s) 2,221,850,624 bytes free

    into something like this:

    Path date size type

    D:examplemain.txt 21/02/2002 11:38 0 txt
    D:exampleexamplesub1subtext1.txt 21/02/2002 11:40 0 txt
    D:exampleexamplesub1examplesubsub1random1.txt 21/02/2002 11:40 0 txt

    etc....

    Sorry about the formatting. the idea is to throw the result into a table, and do some exception reporting on large variations in file size over periods of time.

    The dir listing is emailed to me, so I can't do any fancy filesystem stuff.

    just wondered if anyone had anything even close, so I wouldn't have write the whole thing...

    Any help gratefully accepted.

    Cheers

    Jim

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parse dir output (any)

    At least use FSO to manipulate your dir output file. You'll have lots more fun than if you use Open #
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Lounger
    Join Date
    May 2001
    Location
    Wellington
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parse dir output (any)

    Yeah, thanks Kevin, I promise. But I don't want to do it if it's been done!

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Parse dir output (any)

    > The dir listing is emailed to me, so I can't do any fancy filesystem stuff.

    Perhaps, though, you could prevail on the other person to run a .VBS script that creates the output you want on their end?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •