Solved

Copy Large Files and create a log file

Posted on 2013-02-04
4
474 Views
Last Modified: 2013-02-04
Hello,

I would like to use XCOPY to backup some data on our server but would like to create a log file.  Can I output to a log file that will show the files backed up and possibly the file size of each file backed up?

Thank you.
0
Comment
Question by:cbones
  • 2
4 Comments
 
LVL 14

Expert Comment

by:John-Charles-Herzberg
ID: 38852877
Will this sample help?

xcopy "z:\*.id" "c:\data" /d /L /y >> "C:\Documents and Settings\Administrator\Desktop\ID_Log.txt"

echo. |time |find "current" >> "C:\Documents and Settings\Administrator\Desktop\ID_Log.txt"
echo. |date |find "current" >> "C:\Documents and Settings\Administrator\Desktop\ID_Log.txt"
0
 
LVL 51

Accepted Solution

by:
Bill Prew earned 500 total points
ID: 38852964
By defauly XCOPY will list the files copied, just redirect the output to a log file, like (add any options you want):

XCOPY c:\from d:\to >log.txt

I don't think there is any way to show file size from XCOPY during the copy.  If you wanted that ROBOCOPY might offer it as I recall, but would have to double check.

~bp
0
 

Author Closing Comment

by:cbones
ID: 38853020
Robocopy will log everything I need.

Thank you.
0
 
LVL 51

Expert Comment

by:Bill Prew
ID: 38853221
Welcome, thanks for the feedback.

~bp
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
Are you looking to recover an email message or a contact you just deleted mistakenly? Or you are searching for a contact that you erased from your MS Outlook ‘Contacts’ folder and now realized that it was important.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now