Page 1 of 1

How to report xcopy file list in a txt file?

Posted: 05 Sep 2011 09:28
by tinfanide
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?

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

Posted: 06 Sep 2011 01:25
by Ocalabob
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!

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

Posted: 06 Sep 2011 08:20
by tinfanide
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.