Outputting directory contents to text files...

Discussion in 'Software' started by Jungalist, Apr 3, 2004.

  1. Jungalist

    Jungalist Private E-2

    Is it possible to output the names of the files in a directory to a text file?
     
  2. goldfish

    goldfish Lt. Sushi.DC

    Certainly is!
    you use the dir command in command line, hang on, i forget what the exact command is and its not in the help of "dir"

    sorry, that was pretty useless wasnt it. Adryn will probably know though!
     
  3. Adrynalyne

    Adrynalyne Guest

    If I want to show the directory output of my C: drive, it would be:


    At a C: prompt:

    dir > c:\directory.txt


    This puts the output in a file called directory.txt on the C drive.
     
  4. Adrynalyne

    Adrynalyne Guest

    The output:

    Volume in drive C has no label.
    Volume Serial Number is 2C8C-9E1A

    Directory of C:\

    03/02/2004 10:22 PM <DIR> ATI
    03/02/2004 08:45 PM 0 AUTOEXEC.BAT
    03/30/2004 08:23 AM 192 BcBtRmv.log
    03/02/2004 08:45 PM 0 CONFIG.SYS
    03/09/2004 03:56 PM <DIR> Console
    04/03/2004 11:48 AM 0 directory.txt
    03/02/2004 08:49 PM <DIR> Documents and Settings
    03/08/2004 09:44 AM 30,746 drivers.txt
    03/24/2004 11:17 AM <DIR> Games
    03/02/2004 01:36 PM <DIR> Hotfixes
    03/02/2004 01:36 PM <DIR> Java
    03/09/2004 06:20 PM <DIR> mpad35
    03/02/2004 09:59 PM <DIR> NVIDIA
    03/02/2004 01:36 PM <DIR> Powertoys
    04/01/2004 10:39 AM <DIR> Program Files
    03/02/2004 01:36 PM <DIR> Resource Kit
    03/02/2004 01:36 PM <DIR> Screensavers
    03/11/2004 10:45 AM 186,570 Setup.inx
    04/03/2004 11:48 AM 24 tmp.bat
    03/03/2004 09:28 PM <DIR> UT2003
    04/02/2004 11:45 PM <DIR> WINDOWS
    03/03/2004 12:46 AM <DIR> WUTemp
    10/21/2002 07:32 PM 2,048 xpboot.bin
    03/25/2004 10:22 PM <DIR> Yz dock
    8 File(s) 219,580 bytes
    16 Dir(s) 61,990,797,312 bytes free
     
  5. Adrynalyne

    Adrynalyne Guest

    And with that, I am off to Phoenix for SW Geekfest :D
     
  6. Jungalist

    Jungalist Private E-2

    Oh, I am so ashamed :( I have become so used Graphical Interfaces that I forgot all about my DOS roots!

    Thanks and have fun geeking it up!
     
  7. goldfish

    goldfish Lt. Sushi.DC

    Ahh, it all comes back to me now. BTW that works with any command, so that if you wanted to say output your IP config settings to a text file, ipconfig > c:\ipconfig.txt would work. Rather useful if you ask me! Specially for keeping logs of scheduled tasks...
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds