1.

Solve : LAN connection through command prompt?

Answer»

hey everyone
i was reading about all the network commands DOS has and i now already that ipconfig( tells ur networks ip address) but i READ about NETSH and NCLOOKUP and i got into a pit of confusion. which one allows u to connect to another comp over ur lan?only netsh shows like a pure internal command but nclookup i think it depends according to the version of an operating system.May you try to to the /? option to learn more about the netsh commandnetsh is used to modify/set network configuration or as a diagnostic tool
nslookup is used to read the IP address or DNS name from a DNS server.

If you are looking to connect or map a drive to a remote system, use:

net use * \\remotecomputename\sharename
where the * uses the next open drive letter

or

start \\remotecomputename



oh ok thnx but how do i send data through a connection like if i want to send a file through a lan using command prompt cuz i definetly know that the "copy" command wont work.you can use the copy command, but I'll have to map a network drive first.

example;

net use T: \\ipaddress\sharename /user:username password

copy c:\sometextfile.txt T:\sometextfile.txt

but remember if you do map a drive, you have to delete it as you'll end up with lots of mapped driver all over the place. (net use T: /delete)

Blastman has a good solution, but you can also use the copy command with the UNC path which will prevent you from having to map / unmap the drive (assuming correct permissions are in place). Using his example, the same copy could be done like:
CODE: [Select]copy C:\sometextfile.txt \\ipaddress\sharenameor
Code: [Select]copy C:\sometextfile.txt \\computername\sharenamethnx for u guys helpQuote from: GuruGary on March 06, 2008, 03:43:58 PM

Blastman has a good solution, but you can also use the copy command with the UNC path which will prevent you from having to map / unmap the drive (assuming correct permissions are in place). Using his example, the same copy could be done like:
Code: [Select]copy C:\sometextfile.txt \\ipaddress\sharenameor
Code: [Select]copy C:\sometextfile.txt \\computername\sharename

Hey, why didn't I think of that!!

I suppose I'm used to working in a from admin to user world!! 2 last questions
1 is how do u do the "code" box?
and
2 is when u mean by net use u mean by the command "netsh" right?Quote from: macdad- on March 07, 2008, 06:03:42 PM
1 is how do u do the "code" box?
I assume you are referencing the "Code" box for messages in this forum? Code: [Select]Like this? There are several ways. The way I usually do it is reply to, or start a new message, then type the code in the message box, then select the code portion with your mouse and click on the "code" tag above the smiley FACES (code is the one that LOOKS like the page with the # sign on it).

Quote from: macdad- on March 07, 2008, 06:03:42 PM
2 is when u mean by net use u mean by the command "netsh" right?
No, you don't even NEED netsh. You use the net use command directly from the command prompt. Example from XP: Click Start -> All Programs -> Accessories -> Command Prompt
You end up with something like:
C:\Documents and Settings\macdad>
Enter the command like:
Code: [Select]copy C:\sometextfile.txt \\computername\sharenameor
Code: [Select]net use * \\computername\sharethnx


Discussion

No Comment Found