Computer Hope

Microsoft => Microsoft DOS => Topic started by: rem_bc on February 02, 2010, 05:13:24 AM

Title: batch copy information.
Post 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)
Title: Re: batch copy information.
Post by: BillRichardson on February 02, 2010, 05:31:59 AM

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    <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>
Title: Re: batch copy information.
Post by: Helpmeh on February 02, 2010, 07:22:23 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.
Title: Re: batch copy information.
Post by: BillRichardson on February 02, 2010, 08:05:05 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.
Title: Re: batch copy information.
Post by: Helpmeh on February 02, 2010, 09:24:34 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.
Title: Re: batch copy information.
Post by: BillRichardson on February 02, 2010, 12:44:22 PM
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?
Title: Re: batch copy information.
Post by: Helpmeh on February 02, 2010, 01:49:56 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. 
Title: Re: batch copy information.
Post by: rem_bc on February 03, 2010, 05:00:57 AM
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......
Title: Re: batch copy information.
Post by: Sidewinder on February 03, 2010, 06:37:03 AM
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.

 8)

Title: Re: batch copy information.
Post by: Helpmeh on February 03, 2010, 03:26:23 PM
Reply #2 solved this problem.
Title: Re: batch copy information.
Post by: rem_bc on February 03, 2010, 05:32:52 PM
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.

 8)



Well well. Thanks A lot !!
It works.
So This Topic's Closed.
Title: Re: batch copy information.
Post by: rem_bc on February 03, 2010, 05:36:01 PM
This Topic Closed!!! Thanks To......
Sidewinder, Helpmeh. And my friends.
Title: Re: batch copy information.
Post by: Helpmeh on February 03, 2010, 06:01:27 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.
Title: Re: batch copy information.
Post by: BillRichardson on February 04, 2010, 07:55:03 AM
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