Wednesday, September 26, 2012

ROBOCOPY and LOG


Write a small batch script that will copy all files from one directory to another new directory (which you create) and also "log" the files copied to a file named "mycopiedfiles.log". (Hint:Robocopy).  Please document what you did on your blog and paste a link in the answer portion of this question.  In the blog give a narrative of the problems you encountered.

 "robocopy C:\Directory\Test D:\Backup /MIR /LOG:C:\Users\Joe\Desktop\mycopiedfiles.log"

First I created a folder named "Directory" in the C drive and another folder inside the "Directory" folder and I named it "Test". Inside the "Test" folder I made three different files named Example 1, Example 2, and Example 3. I then made a folder named "Backup" inside my D drive. I entered the robocopy and LOG script inside the command Prompt. Which turned out like this inside the prompt "robocopy C:\Directory\Test D:\Backup /MIR /LOG:C:\Users\Joe\Desktop\mycopiedfiles.log". I was able to copy the three example files from my "Test" folder and move the three example files to the "Backup" folder from two different drives. Then I was able to log the action made in command prompt in a text file on my desktop. The only issues I had was making sure the script was right and every path was correct. So I just messed around with the Command Prompt until everything worked out.

No comments:

Post a Comment