Go Back   TechArena Community > Software > Tips & Tweaks
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Batch file to copy a file from the local drive to a computer on lan?

Tips & Tweaks


Reply
 
Thread Tools Search this Thread
  #1  
Old 12-03-2009
Member
 
Join Date: Mar 2009
Posts: 5
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$

Reply With Quote
  #2  
Old 12-03-2009
Member
 
Join Date: Apr 2008
Posts: 598
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
Reply With Quote
  #3  
Old 12-03-2009
Member
 
Join Date: Mar 2008
Posts: 82
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%"
Reply With Quote
  #4  
Old 12-03-2009
Member
 
Join Date: Mar 2009
Posts: 5
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.
Reply With Quote
Reply

  TechArena Community > Software > Tips & Tweaks
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Batch file to copy a file from the local drive to a computer on lan?"
Thread Thread Starter Forum Replies Last Post
batch file to copy file to another place bomblast Windows Software 1 03-11-2011 01:53 AM
Batch file to copy ip zaharkl Technology & Internet 1 21-04-2011 11:50 AM
How to run batch file each time computer boots Gannon Software Development 4 27-03-2010 06:53 PM
Batch File to Move or Copy Files Pratim Windows Software 6 21-03-2010 10:32 PM
How to add local domain user via batch file Imtiyaz Networking & Security 3 18-05-2009 10:51 PM


All times are GMT +5.5. The time now is 01:00 AM.