Monday, April 20, 2020

Can I view all computer names on network using a batch file?

Luis Mellon: OK. You can get a list of all computer names on a network using the following command:net viewEnter 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: \pc123sharedFoldercopy 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:domainnamelusername.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 fil! ename 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.txtGood luck....Show more

Chris Rosenkranz: That's a bit of a mess ok! Log on as an Administrator and do a search for *.bat (That's star/asterisk dot bat) using 'Advanced search' for system and hidden files and delete any that show in BurnDvd.bat. Then the easiest way to undo the rest is a system restore.

Troy Monsivais: 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-or...

Julee Lanham: try the net view commandthen after that copy the name of the computer you want to access likehere the list\ISA-SE333RVER\NE2\NIWDLthE-PC\NPI3054wwwww3Cthen goto to start menu> run > then paste the name of the computer like thisi chose\NIWDLthE-PCthen after that put your file (shared)! i hope this one would help you...there you have it gud luck......Show more

No comments:

Post a Comment