Link to home
Start Free TrialLog in
Avatar of overflow34
overflow34

asked on

need help copying files to network share

This should be easy but I am having problems.

I need to copy files from a local folder to a shared folder on the server.  I need to have all files copied over no matter how deep into the folder structure it is.  I also do not want to over write duplicate file names.  This will all have to run weekly on a windows 2000 machine that cannot have any software installed on it whether it is logged in or not.  

Patients come in every day and have medical images taken.  These images are then copied to a subfolder based on patient name.  In that folder is a folder based on date.  The information on the local computer will stay pretty close but some things might be deleted or added to the sub folders.  The server copy should never have anything deleted only added to.

These computers are on different networks and the local computer is not always logged in.  Also the mapped drive will only be mapped during the backup time.
Avatar of overflow34
overflow34

ASKER

Currently we do this manually.

Run a cmd file to map drive
   
  net use z: /del
  net use z: \\serverIP\sharename /user:domain\username password

Then we move the files over.
ASKER CERTIFIED SOLUTION
Avatar of ArtieG
ArtieG

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Robocopy is not installed on the computer.  I will check with the vendor to see if it is possible to install on the system but would like to know if there is a option using xcopy or another tool that is installed in a default install of windows 2000 or XP.
This is ok by vendor specs so a copy has been moved to the hard drive.  I will have to figure out the /R:1 because we do not want this to retry 1 million times.  The way the documentation reads is the registry has to be modified to fix this.  I will do more reading on this and then add it into out code.

@ECHO off

net use z: /del
net use z: \\server\data

robocopy.exe c:\data z:\ /COPYALL /E /NP /XO /LOG+:c:\Log.txt

:: /R:1 will retry 1 milion times  
:: The retry is a good option but it asks for a registry change to modify it.
:: /W:1 Is tied to the Retry and waits 30 seconds.
Actually, R:1 means that it will retry each file one time, and accordingly the W:1 means it will wait one second before retrying.

The default of 1 million that the webpage discusses refers to if you were to attempt to just do a /R and not include a specified number. This goes for the /W as well, if you were to only do a /W it would wait for 30 seconds before retrying that file.