Thread: directory access

  1. #1
    Registered User
    Join Date
    May 2006

    directory access

    Hello everyone,

    When using dir command to list all the files in a directory, for example, here is an output,

    Volume in drive C is C
    Volume Serial Number is CC95-21FF

    Directory of C:\temp\test

    2006-08-26 16:47 <DIR> .
    2006-08-26 16:47 <DIR> ..
    2006-08-26 16:47 0 foo.txt
    2006-08-26 16:47 0 goo.txt
    2 File(s) 0 bytes
    2 Dir(s) 3,082,964,992 bytes free

    What I want to get are, foo and goo (files ends with .txt). I know how to do this in a programming way, parsing and parsing ... :-)

    Could anyone have any ways which does not need programming, for example, by using some Windows commands (does there are any commmad like grep or cut on Linux)?

    thanks in advance,

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Damnit people! If you're trying to do something which does note need programming then get out of the programming forums!

    Hope is the first step on the road to disappointment.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Bordering on being a troll here george

    Your questions lack any sense of direction or purpose.
    One minute it's windows, and then it's VxWorks
    Or advanced graphics then simple text parsing.
    What's going on here?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Quote Originally Posted by George2
    (does there are any commmad like grep or cut on Linux)?
    Why not just use grep and awk??? Windows versions are avaliable.

  5. #5
    Registered User
    Join Date
    Aug 2006


    Quote Originally Posted by George2
    What I want to get are, foo and goo (files ends with .txt)
    What the hell do you mean "get"? As in open? Your question is way too vague...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  2. ww hosting and SSH access
    By spoon_ in forum A Brief History of
    Replies: 9
    Last Post: 04-07-2005, 08:49 AM
  3. open directory and copy files
    By 5n4k3 in forum C++ Programming
    Replies: 3
    Last Post: 08-06-2003, 09:49 AM
  4. phone book directory 2
    By arangawawa in forum C Programming
    Replies: 4
    Last Post: 08-01-2003, 05:32 PM
  5. Replies: 6
    Last Post: 07-30-2003, 03:08 AM