1.

Solve : batch copy information.?

Answer»

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?   
C:\batch>TYPE rembc.bat


Code: [Select]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              .
12/20/2009  02:45 PM              ..
01/29/2010  07:40 PM              Desktop
05/02/2009  07:58 AM              Documents
04/25/2008  03:22 AM              Favorites
05/07/2009  02:55 PM           262,144 NTUSER.DAT
05/10/2009  12:50 PM              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> QUOTE from: BillRichardson on February 02, 2010, 05:31:59 AM

Code: [Select]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. Quote from: Helpmeh on February 02, 2010, 07:22:23 AM
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. Quote from: BillRichardson on February 02, 2010, 08:05:05 AM
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. Quote from: Helpmeh on February 02, 2010, 09:24:34 AM
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? Quote from: BillRichardson on February 02, 2010, 12:44:22 PM
Maybe should let Rem_bc, the original poster, decide what he needs?
Maybe you should read.
Quote
The batch file can copy the information.
The information is not in the files, it is in the dir command's output.  Quote from: Helpmeh on February 02, 2010, 01:49:56 PM
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.

Quote
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.

Code: [Select]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.

 

Reply #2 solved this problem. Quote from: Sidewinder on February 03, 2010, 06:37:03 AM
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.

Code: [Select]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.

 



Well well. Thanks A lot !!
It works.
So This Topic's Closed.This Topic Closed!!! Thanks To......
Sidewinder, Helpmeh. And my friends.
Quote from: rem_bc on February 03, 2010, 05:36:01 PM
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




Discussion

No Comment Found