-
December 28th, 2004, 10:33 PM
#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.
-
December 28th, 2004, 10:38 PM
#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.
-
December 28th, 2004, 10:45 PM
#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?
-
December 28th, 2004, 10:47 PM
#4
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!
-
December 28th, 2004, 11:07 PM
#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.
-
December 28th, 2004, 11:14 PM
#6
umm...
Code:
dir 'dvd drive letter' >'yourfilenamehere'.txt
-
December 28th, 2004, 11:16 PM
#7
That's it! I thought I had a remembered there being a ">" in there somewhere!
-
December 28th, 2004, 11:17 PM
#8
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!
-
December 28th, 2004, 11:27 PM
#9
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
-
December 28th, 2004, 11:41 PM
#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
-
Forum Rules
|
|