Computing.Net > Forums > Programming > Connect to Other PC Using Batch

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Connect to Other PC Using Batch

Reply to Message Icon

Name: SureshBat
Date: February 12, 2009 at 01:31:47 Pacific
OS: Microsoft Windows XP Professional
CPU/Ram: 2.992 GHz / 1014 MB
Product: Ibm / 8175mqu
Subcategory: Batch
Comment:

Hi All,

Can any one tell me how to connect to another pc and transfer files from that pc to our pc by using a batch script.

Thanks In Advance



Sponsored Link
Ads by Google

Response Number 1
Name: TechGeekJim
Date: February 13, 2009 at 07:54:05 Pacific
Reply:

A few assumptions I will make:

1. You are doing this over an internal network

2. You have administrative rights on both machines

3. You want to copy, rather than move the files, to the target machine

Connect your PCs through either a switch or crossover cable. If your login is different on each machine, when starting the script you will be prompted to authenticate.

Create a folder in "My Documents" on the remote machine, name it "Transfer" and move all the files you want to copy into that folder.

Create the same named folder in the same location on the target machine to copy the files to.

For this script's purposes:

IP Address of machine you want to take the files from = 10.0.0.10

Your admin name on the remote machine = John

Your admin name on the local machine = Maria

Location of files on 10.0.0.10 = c:\Documents and Settings\John\My Documents\Transfer

Location on the target machine you want to place the files = c:\Documents and Settings\Maria\My Documents\Transfer

Open notepad and type in the following:

Net use z: "\\10.0.0.10\c$\Documents and Settings\John\My Documents\Transfer"

robocopy z:\ "c:\Documents and Settings\Maria\My Documents\Transfer"

Pause

Net use z: /delete


Then save this file on the desktop of the local machine and name it "Transfer.bat". To start the script, simply double click on it. Let me know how it works out for you.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Connect to Other PC Using Batch

Connecting to Oracle 9i using Java www.computing.net/answers/programming/connecting-to-oracle-9i-using-java/9794.html

VB connect to vpn www.computing.net/answers/programming/vb-connect-to-vpn/13800.html

Connecting PHP to other databases www.computing.net/answers/programming/connecting-php-to-other-databases/9250.html