Hello,
I would like to know if there was a way to view all computer names on a network using a batch file? It would be so much easier than going from computer to computer looking at the name. Also, is there a way to send files to computers on a network. I know how to send messages already.
~Thanks!
FIX PC ERRORS
PC Integrity Scanner
Know What Happens on YOUR PC
If you enjoyed this post, make sure you subscribe to my RSS feed!






Why not get a freeware network scan tool and it will scan the network and show the names etc.. One is called advanced lan scanner, see the link below;
http://www.pcworld.com/downloads/file/fid,46183-order,1-page,1/description.html
OK. You can get a list of all computer names on a network using the following command:
net view
Enter it in the command console (or a batch file) and it will output all the PC’s on the network. Now, as for actually “searching” those, that’s more complicated. You could create a file containing this list and them iterate through the file, but it’s a little more complicated.
As for “sending” files, it would simply be a matter of copying them to the remote share (assuming you had write permission). In order to do this from a Command Prompt, you would have to map the remote share to a drive letter and then use the “copy” command to copy the file to the mapped drive letter.
You can create a drive mapping with the “net use” command. The resulting batch would look similary to below.
net use z: \\pc123\sharedFolder\
copy someFile.txt z:
Optionally, you can append a couple of other arguments to the NET USE command. If the remote share requires a login, you can specify your user’s password immediately after the share path. If you want to use a different user name, specify /USER:domainname\lusername.
As for iterating throught the PC name list from the batch file, do a check on the net. I know it’s possible, cause I’ve done it before, but it’s been a lot of years so I don’t remember the syntax off the top of my head. Let me know if you can’t find it and I’ll try & dig out some old files & see if I can find it.
If you wanted to search through all the files on a remote PC, you could use “NET VIEW \\compterNetworkName”. That will list all the shares from that PC. Then, you would have to use the “NET USE” command to map each one in sequence and do a “DIR/a/s/b” and then specify your search mask. For example, if you were looking for any jpg images, your mask would be “*.jpg”. Then, it would just be a matter of determining if this DIR search found any files. Using the “/b” switch means “bare” so it will only return file names. This means one filename per line, so “file(s) found = returned > 1 line”.
Oh, and to output any Command Prompt output to a file, just use the greater than symbol followed by the file name, like so:
dir/a/s/b > myDirectoryList.txt
Good luck.
try the net view command
then after that
copy the name of the computer you want to access like
here the list
\\ISA-SE333RVER
\\NE2
\\NIWDLthE-PC
\\NPI3054wwwww3C
then goto to start menu> run > then paste the name of the computer like this
i chose
\\NIWDLthE-PC
then after that put your file (shared)
i hope this one would help you…
there you have it gud luck…