Solved

Copy certain file extensions from user's network share to alternate network location

Posted on 2014-03-19
2
598 Views
Last Modified: 2014-03-19
Hi Experts.  I asked this question before and got an answer but I am unable (for some reason) to use it now.  Not sure why but I've tried it a few times and I'm ready to ask for assistance.  I will be running the code from my Windows 7 workstation.

I need to copy .doc and .docx files from the user's network share (\\fileserver\user\%username%) to a central location \\fileserver2\tbd) and output what was copied in a text file (copiedfiles.log).

I am trying to use this code but it isn't copying the files.

robocopy "\\FileServer\Share" "\\FileServer2\TBD" *.doc *.docx /log:"S:\CopiedFiles.txt"

This is what I am getting in the copiedfiles.txt file:
-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows                              
-------------------------------------------------------------------------------

  Started : Wed Mar 19 11:36:51 2014

   Source : \\fileserver\users\
     Dest : \\fileserver2\TBD\

    Files : *.doc
          *.docx
          
  Options : /COPY:DAT /R:1000000 /W:30

------------------------------------------------------------------------------

                         0      \\fileserver\users\

------------------------------------------------------------------------------

               Total    Copied   Skipped  Mismatch    FAILED    Extras
    Dirs :         1         0         1         0         0         0
   Files :         0         0         0         0         0         0
   Bytes :         0         0         0         0         0         0
   Times :   0:00:00   0:00:00                       0:00:00   0:00:00

   Ended : Wed Mar 19 11:36:51 2014



Any and all help will be appreciated.
0
Comment
Question by:samiam41
2 Comments
 
LVL 78

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 39940233
You're not recursing the subdirectories

robocopy "\\FileServer\Share" "\\FileServer2\TBD" *.doc *.docx /log:"S:\CopiedFiles.txt" /S /XO

Open in new window


/XO - Excludes older files with the same name

Do you have a Server 2008 or 2012 on the network?  It can be done by it automagically
0
 
LVL 9

Author Comment

by:samiam41
ID: 39940302
File server is a 2003 going to a new file server that's running 2008.

Thanks for your help!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
OfficeMate Freezes on login or does not load after login credentials are input.
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

746 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

12 Experts available now in Live!

Get 1:1 Help Now