How to report xcopy file list in a txt file?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
tinfanide
Posts: 117
Joined: 05 Sep 2011 09:15

How to report xcopy file list in a txt file?

#1 Post by tinfanide » 05 Sep 2011 09:28

I've tried this:

Code: Select all

xcopy "c:\a.txt" "d:\" > d:\copyList.txt


But it only returns
the command line

c:\a.txt > d:\

But I want:
a.txt

How can it be done?

Ocalabob
Posts: 79
Joined: 24 Dec 2010 12:16
Location: Micanopy Florida

Re: How to report xcopy file list in a txt file?

#2 Post by Ocalabob » 06 Sep 2011 01:25

Greetings tinfanide,

Try, xcopy "c:\a.txt" "d:\">>d:\copyList.txt

Then copyList.txt will contain:

C:\a.txt
1 File(s) copied

Is that the results you want?

Best wishes!

tinfanide
Posts: 117
Joined: 05 Sep 2011 09:15

Re: How to report xcopy file list in a txt file?

#3 Post by tinfanide » 06 Sep 2011 08:20

Thanks for ya quick reply.
Yes, I seemed to have forgotten to use >> instead of >.
I can't tell the difference but ya reminded me of that.

Post Reply