Batch file to copy file from one system to on

 div -

I have two systems: the first one is a domain member and other is the workgroup computer. Now I want to schedule copy command for copying one file on a daily basis from workgroup computer to domain member computer.

It is possible with a batch file?

Workgroup computer name: hisserver
User: administrator
Password: hisserver
Domain Member: hisbackup
User: administrator
Password: *healthbackup

System Configuration: Windows 2003 Internet Explorer 6.0

6 replies


Please try the following batch command:
  • set path=c:\WINDOWS\system32;
  • echo Copying started at %date% %time%>>_date_.txt
  • xcopy E:\backup \\SERVER\BACKUP\others /s /a /d
  • echo Copying finished at %date% %time%>>_date_.txt
  • echo Completed Successfully at %date% %time%>>_date_.txt
  • echo --------------------------------------------------------------------------- >>_date_.txt
hi I have tired this way but it shows me erros,,,,iam trying to copy a file from my local machine(vista) to a remote machine(windows2003) and I am trying to copy a file from from
my c:\folder to c:\transfer in remote machine and I have given same command lines and it doesnot.

i have given like this xcopy c:\practicetemp \\ C:\transfer /s/a/d

rest is same,,,,,,,it gives invalid num of parameters works..thanks
xcopy directory [destination-directory]

and then turn this into a .BAT file
mudbrains, can you explain the purpose of this statement in your code?
set path=c:\WINDOWS\system32;
We can use NET USE COMMAND to connect to a remote computer
yes but psexec should have been installed on remote machine
Right click Command Promt and choose Run As - Administrator (local or domain)
Run the batch file from the Commnad Promt windows just open.
but how will the networ drive get mapped

what about username and password


No need to map the network, allow permission in the server backup directory for that domain user.

> Mudbrains
Ok, what if I wanted to Sync files from a Windows PC using an FTP Network Connection that has been defined and works just fine.

I want to use that connection to SYNC to a remote server.

I'd like to create a batch file that I can add to my Task Scheduler.