Computer Hope
Microsoft => Microsoft DOS => Topic started by: rem_bc on February 02, 2010, 05:13:24 AM
-
hi every 1
i wanna create a batch file.
like this......
C:\Documents and Settings\User>dir
Volume in drive C has no label.
Volume Serial Number is 176F-C525
Directory of C:\Documents and Settings\User
02/02/2010 08:10 PM <DIR> .
02/02/2010 08:10 PM <DIR> ..
02/01/2010 11:47 AM <DIR> Desktop
02/02/2010 08:10 PM 0 dir
12/28/2009 10:04 PM <DIR> dwhelper
01/29/2010 04:03 PM <DIR> Favorites
02/02/2010 08:10 PM 0 My
02/01/2010 10:28 AM <DIR> My Documents
02/02/2010 08:10 PM 0 Start
12/11/2009 05:56 PM <DIR> Start Menu
01/28/2010 10:22 AM <DIR> Tracing
02/02/2010 07:53 AM 3,532 vodservercfg.blf.bak
4 File(s) 3,532 bytes
8 Dir(s) 17,103,572,992 bytes free
The batch file can copy the information.
So what is my batch? (http://public.blu.livefilestore.com/y1pQuDUzEJunvDXZ3FcYlArQOvO0h7KlGuetD_AVceaQ4bPrQCAn6q6lTyL2v6f_LNtGu9ZGkjrX3ThYgiCowuZjw/nila.gif)
-
C:\batch>type rembc.bat
@echo off
cd "C:\Documents and Settings\All Users"
dir
copy *.* E:\
Output:
C:\batch>rembc.bat
Volume in drive C has no label.
Volume Serial Number is F4A3-D6B3
Directory of C:\Documents and Settings\All Users
12/20/2009 02:45 PM <DIR> .
12/20/2009 02:45 PM <DIR> ..
01/29/2010 07:40 PM <DIR> Desktop
05/02/2009 07:58 AM <DIR> Documents
04/25/2008 03:22 AM <DIR> Favorites
05/07/2009 02:55 PM 262,144 NTUSER.DAT
05/10/2009 12:50 PM <DIR> Start Menu
1 File(s) 262,144 bytes
6 Dir(s) 301,551,104,000 bytes free
NTUSER.DAT
1 file(s) copied.
C:\Documents and Settings\All Users>
-
copy *.* E:\
Copy the information, not the files.
Try this.
Dir >dir.txt
Open up dir.txt and find all the information that would have been printed on the screen.
-
Copy the information, not the files.
Dir >dir.txt
Open up dir.txt and find all the information that would have been printed on the screen.
When we copy the files, the information is inside the files. Rem_bc, the OP(original poster) needs the information and not just the file names.
-
When we copy the files, the information is inside the files. Rem_bc, the OP(original poster) needs the information and not just the file names.
The OP asked for asked for a batch file that will capture the information provided from the dir command.
-
The OP asked for asked for a batch file that will capture the information provided from the dir command.
Maybe should let Rem_bc, the original poster, decide what he needs?
-
Maybe should let Rem_bc, the original poster, decide what he needs?
Maybe you should read.
The batch file can copy the information.
The information is not in the files, it is in the dir command's output.
-
Maybe you should read. The information is not in the files, it is in the dir command's output.
Ok guys. What i want is the batch file that can copy the information into a text file.
*.txt
please help......
-
Your post is ambiguous.
The batch file can copy the information.
Copy it where? What information? the dir command output? the files themselves? Please try to me more specific.
Not certain why the wildcard is used in the output file name.
@echo off
dir "C:\Documents and Settings\User" > dir.txt
If you want to see the output, add type dir.txt as the last line in the batch file.
8)
-
Reply #2 solved this problem.
-
Your post is ambiguous.
Copy it where? What information? the dir command output? the files themselves? Please try to me more specific.
Not certain why the wildcard is used in the output file name.
@echo off
dir "C:\Documents and Settings\User" > dir.txt
If you want to see the output, add type dir.txt as the last line in the batch file.
8)
Well well. Thanks A lot !!
It works.
So This Topic's Closed.
-
This Topic Closed!!! Thanks To......
Sidewinder, Helpmeh. And my friends.
-
This Topic Closed!!! Thanks To......
Sidewinder, Helpmeh. And my friends.
No problem. I'm glad we can help. A mod may close this thread, but there's no real need.
-
Mountains vs Molehills.
"Making a mountain out of a molehill or over-reaction is to make too much of a minor issue. In cognitive psychology, this form of cognitive distortion is called magnification."
http://en.wikipedia.org/wiki/Make_a_mountain_out_of_a_molehill