Looking for DOS Command
Results 1 to 10 of 10

Thread: Looking for DOS Command

  1. #1

    Looking for DOS Command

    This one's a really easy question for you guys today!

    I'm trying to do this in DOS, but forgot the command. I did it a couple of weeks ago, but I can't remember or find it on google to save my life. Here's what I want to do:

    1) Go to my DVD-R
    2) dir to list it's contents
    3) Save the list of contents straight to a new file

    So I just need to know how to do #3. Not save the file contents -- I mean the actual directory list of files on the DVD. There's a way to do it with a routing command (you'r basically saving the printout from the dir command to a new file), but I can't remember it for the life of me.

  2. #2
    So you want to save a text file ? I don't know the command but can you just do right clikc- > Mark, select all the text and the ctrl+c and ctrl+v into notepad and save the file ?

    Sorry about that Ctrl+C doesnt work, do this, Right click -> Mark, select the text and then click on it with the Right mouse button again, and then paste the text into notepad.
    StreetsCrack.com Join The Best Music Social Network Online. Music downloads, promotions, forums, profile, games etc...

  3. #3
    There's a specific reason I want to use the DOS command though, and dang it, I just can't remember! It was pretty simple though. Just took the output of the DIR command and saved it straight to a new file.

    Anyone? Anyone? Bueler?

  4. #4
    ********** |ceWriterguy
    Join Date
    Aug 2004
    Posts
    1,608
    From dos - 2 commands that might work for you -

    assumption: dvd drive is E:
    assumption: dir on c: to be copied to is called 'dvd'

    c:\>copy E: *.* c:\dvd\

    There's also a tag you can use at the end of that command to make it look for and copy anything in any subdirectories as well, but I can't remember it offhand. Copy ? might help you find it.

    There also used to be a command called 'diskcopy' which was used like this -

    c:\dvd\>diskcopy e:

    not sure if that one exists beyond dos 6.0 though.


    Luck to ya!

    [edit] oops. next time I read the entire post before going to the solutions. try this -

    dir e: | c:\filename.txt

    hope that helped! [/edit]
    Even a broken watch is correct twice a day.

    Which coder said that nobody could outcode Microsoft in their own OS? Write a bit and make a fortune!

  5. #5
    Did this command, trying to copy the list of contents of the directory named "DVD9" on the DVD in the F drive to a file named "backup.txt":

    C:\>dir F:\DVD9 | C:\backup.txt
    But it simply opens backup.txt and doesn't write anything to it.

  6. #6
    the beign of authority kurt_der_koenig's Avatar
    Join Date
    Jan 2004
    Location
    Pa
    Posts
    567
    umm...

    Code:
    dir 'dvd drive letter' >'yourfilenamehere'.txt

  7. #7
    That's it! I thought I had a remembered there being a ">" in there somewhere!

  8. #8
    ********** |ceWriterguy
    Join Date
    Aug 2004
    Posts
    1,608
    hrm.... ok, time to dig a bit -

    tried it with a cd on my drive with no luck either. how annoying - here's what failed -

    d:\> dir | c:\test.txt

    (says non-system or batch file, so I tried : )

    c:\> copy con test.bat
    F6 (to close copy con and leave a blank .batfile)

    then

    d:\>dir | c:\test.bat

    this seemed to work, but on typing the test.bat file I saw no input.

    I also tried those same solutions with test.txt - also no luck.

    I guess XP's dos emulator isn't dos after all... here's a suggestion for a workaround -

    dir the drive then pipe it to ctrl P - prints out the dir for you...then manually enter the file, or...

    dir /p, then highlight the display and ctrl+c to copy it, then move to the new file and ctrl +v to paste, and repeat until you get the entire contents done - sorry I couldn't offer more.
    Even a broken watch is correct twice a day.

    Which coder said that nobody could outcode Microsoft in their own OS? Write a bit and make a fortune!

  9. #9
    the beign of authority kurt_der_koenig's Avatar
    Join Date
    Jan 2004
    Location
    Pa
    Posts
    567

    Talking no problem!

    Glad it worked out for you! I just found this on google: basic piping. It should help remind you in the future!

    kurt

  10. #10
    Piping! That was my problem. I was thinking "routing" instead of "piping". That's what messed up my googling!

Posting Permissions

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