Batch file to copy file from one system to on [Solved/Closed]

- - Latest reply:  div - Apr 17, 2015 at 02:40 PM
Hello,

I have two systems ,one is domain member and other is workgroup computer.Now I want to shedule copy command for copying one file on daily basis from workgroup computer to domain member computer.

It is possible with batch file?

Workgroup computer Name :-hisserver
user :administrator
password :hisserver

Domain Member :hisbackup
user : administrator
Password:*healthbackup
See more 

6 replies

Best answer
22
Thank you
xcopy directory [destination-directory]

and then turn this into a .BAT file

Say "Thank you" 22

A few words of thanks would be greatly appreciated. Add comment

CCM 4448 users have said thank you to us this month

9
Thank you
mudbrains, can you explain the purpose of this statement in your code?
set path=c:\WINDOWS\system32;
6
Thank you
Hi,

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

pause
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 \\10.65.1.71 C:\transfer /s/a/d

rest is same,,,,,,,it gives invalid num of parameters
-
great..it works..thanks
3
Thank you
We can use NET USE COMMAND to connect to a remote computer
yes but psexec should have been installed on remote machine
2
Thank you
Right click Command Promt and choose Run As - Administrator (local or domain)
Run the batch file from the Commnad Promt windows just open.
1
Thank you
but how will the networ drive get mapped

what about username and password


regards
ambrish
Hi,

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

Thanks
JJ
> 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.