Results 1 to 4 of 4

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

  1. #1
    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$

  2. #2
    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

  3. #3
    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%"

  4. #4
    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.

Similar Threads

  1. batch file to copy file to another place
    By bomblast in forum Windows Software
    Replies: 1
    Last Post: 03-11-2011, 12:53 AM
  2. Batch file to copy ip
    By zaharkl in forum Technology & Internet
    Replies: 1
    Last Post: 21-04-2011, 10:50 AM
  3. How to run batch file each time computer boots
    By Gannon in forum Software Development
    Replies: 4
    Last Post: 27-03-2010, 05:53 PM
  4. Batch File to Move or Copy Files
    By Pratim in forum Windows Software
    Replies: 6
    Last Post: 21-03-2010, 09:32 PM
  5. How to add local domain user via batch file
    By Imtiyaz in forum Networking & Security
    Replies: 3
    Last Post: 18-05-2009, 09:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •