Batch file to copy a file from the local drive to a computer on lan?
Batch file to copy a file from the local drive to a computer on lan?
I need to create a batch file to copya file from the local drive to a computer on LAN based on the PC's IP address
I need to be prompted for the file to be copied and also the destinations IP address and drive eg \\12.x.x.x\c$
Re: Batch file to copy a file from the local drive to a computer on lan?
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
Re: Batch file to copy a file from the local drive to a computer on lan?
Try using double quotes around the string containing the long names:
eg. copy c:\performance.txt "C:\documents and settings\%username%"
Re: Batch file to copy a file from the local drive to a computer on lan?
What I mean was, I should be prompted for a file name, to which I enter a file name, and then be prompted for the destination where that file be copied.