Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Computers (https://www.askmehelpdesk.com/forumdisplay.php?f=242)
-   -   Save directory listing to .txt file (https://www.askmehelpdesk.com/showthread.php?t=28194)

  • Jun 23, 2006, 12:37 PM
    RickJ
    Save directory listing to .txt file
    This is kind of part2 to a question long closed. I played with software to do this but did not like the registry changes it made. I'm using WinXP

    I dug up an old email with "instructions" but cryptic ones to my pea-brain:

    Me: "Can you remind me how to save a directory listing to file?"
    Him: "Open a DOS window in the folder you want. Type dir > rick.txt"

    What-the-how-the-heck?

    How do I "open a dos window in the folder"?
    Then how do I designate where I want the file to go?

    I do have a print directory option when I right click on a folder, but I want to save it to file, not print it.

    Thanks!
  • Jun 23, 2006, 12:40 PM
    Curlyben
    Here you go

    • Start
    • Run
    • Type cmd (gives you a 'DOS' window)
    • Navigate to the folder you want (c:\folder)
    • Type DIR > rick.txt

    Job done ;)
  • Jun 23, 2006, 12:48 PM
    RickJ
    Now I'll really show my stupidity :o :

    I forget how to navigate from there.

    When I run cmd.exe it puts me with the curser flashing right after
    c:\Documents and Settings\Rick>

    The directory I want to save to file is
    g:\My Music
  • Jun 23, 2006, 12:52 PM
    Curlyben
    OK try this

    g:
    Cd\my music

    ;)
  • Jun 23, 2006, 12:57 PM
    ScottGem
    Typing Help at the command prompt will give you a list of commands. Typing Help command will give you the syntax for that command.
  • Jun 23, 2006, 12:57 PM
    RickJ
    Cool!

    Ok, now I'll get a bit picky. The formatting is ugly. Each file is one line preceded with date, time and file size - followed by the file type.

    Is there a way to get just a listing of the file names?
  • Jun 23, 2006, 12:59 PM
    Curlyben
    Come on Rick.
    Engage brain
    You've got the txt file so throw it into excel and kill off the info you don't need ;)
  • Jun 23, 2006, 01:01 PM
    RickJ
    Well, as is the norm when I'm still at work at 4PM EST on a Friday: Out of Braincells.

    [a red faced rick smacks self on forehead]
  • Jun 23, 2006, 01:04 PM
    ScottGem
    There are actually ways, using the DIR command to trim the list, but bringing it in Word or Excel and making a table out if it is easier.
  • Jun 23, 2006, 01:27 PM
    Northwind_Dagas
    Quote:

    Originally Posted by ScottGem
    There are actually ways, using the DIR command to trim the list, but bringing it in Word or Excel and making a table out if it is easier.

    Well, I'm not sure it's easier. For me, the fewest steps needed would be easier.

    Dir /w > rick.txt

    Would create your text file with just the names of files. Actaully, it would also include directories, so if you wanted exclude them:

    Dir /w /a-d > rick.txt
  • Jun 24, 2006, 08:07 AM
    RickJ
    Nixed by the spread.
    Thanks, ND!
  • Nov 25, 2011, 12:11 AM
    johnMoose
    Thank you geniuses!

  • All times are GMT -7. The time now is 01:15 AM.