| Author |
Spid's Fri (10/11) Win2K Pro. QoD
|
|
|
| Yahoooo! It's Frrrrrrriiddaaaayyy!!
Which of the following batch files would successfully map a drive to a shared folder called Backup located on a server named FILESRV, copy the booty.txt file to that folder, and disconnect the shared drive?
A. NET SHARE Z: \\FILESRV\Backup
Copy c:\booty.txt z:\
NET USE Z: /delete
B. NET USE Z: \\FILESRV\Backup
Copy c:\booty.txt z:\
NET USE Z: /delete
C. NET USE Z: \\FILESRV\Backup
Copy c:\booty.txt z:\
NET STOP Z:
D. NET SESSION Z: \\FILESRV\Backup
Copy c:\booty.txt z:\
NET SESSION Z: /delete
Have a great weekend and see you Monday for the answer! | |
| Slinky 2002-10-11, 8:55 am |
| B. I don't believe you can copy the boot.ini file since it has the hidden attribute. Need to unhide it first. | |
|
| quote: Originally posted by Slinky
B. I don't believe you can copy the boot.ini file since it has the hidden attribute. Need to unhide it first.
Whoopsie! Your right. Must not have had enough coffee in me yet to be completely awake. I've changed the file from boot.ini to booty.txt 
Thanks Slinky! | |
| Deja-vue 2002-10-11, 9:44 am |
| My gut feeling lets me choose Answer C, but Slinky has yet to be wrong.... hmmm.. | |
| denis_baribeau 2002-10-11, 10:07 am |
| Don't know have to read up on that .
Sorry | |
|
| quote: Originally posted by denis_baribeau
Don't know have to read up on that .
Sorry
The command prompt is your friend. Learn to luv it  | |
| rafman 2002-10-11, 11:02 am |
| The most logical answer to me (just from usage of some of those commands) would be:
B. NET USE Z: \\FILESRV\Backup
Copy c:\booty.txt z:\
NET USE Z: /delete
~R | |
| tweetgirl 2002-10-11, 11:46 am |
| The answer is B. | |
| NetChild1985 2002-10-11, 12:28 pm |
| I'd say "C"! | |
|
|
| Slinky 2002-10-11, 4:40 pm |
| quote: Originally posted by NetChild1985
I'd say "C"!
Hey your not agreeing with me. Thats a first.  | |
| twister166 2002-10-11, 4:57 pm |
| The answer is B, but it will not work on Win ME... ME suck!!!
And yes, I am still waiting to crack the bottle of wine when Slinky miss one!!!  | |
|
|
|
|
| Slinky 2002-10-11, 7:05 pm |
| LOL. Got me there.  | |
| hazz_bin 2002-10-11, 7:47 pm |
| Well, a very tricky question indeed Spid. Both A and B will effectively work, except that A might leave the share in place as it is setup with the SHARE command and not the USE command. (I'll have to try it at home when I get a chance.)
C will setup the share and copy the file, but the STOP command works on services, so as written it won't disconnect from the network. The SESSION command in D: will list open sessions and allow one to disconnect from a session but there is no way to create a share with that. So, the one that keeps to all of the details is B. | |
|
|
|
| quote: Originally posted by Spid
Yahoooo! It's Frrrrrrriiddaaaayyy!!
Which of the following batch files would successfully map a drive to a shared folder called Backup located on a server named FILESRV, copy the booty.txt file to that folder, and disconnect the shared drive?
A. NET SHARE Z: \\FILESRV\Backup
Copy c:\booty.txt z:\
NET USE Z: /delete
B. NET USE Z: \\FILESRV\Backup
Copy c:\booty.txt z:\
NET USE Z: /delete
C. NET USE Z: \\FILESRV\Backup
Copy c:\booty.txt z:\
NET STOP Z:
D. NET SESSION Z: \\FILESRV\Backup
Copy c:\booty.txt z:\
NET SESSION Z: /delete
Have a great weekend and see you Monday for the answer!
And the answer is.....B
NET SHARE is used to create a new share or list existing shares. You can not map a drive to a share using NET SHARE.
NET STOP is used to stop file sharing related services and is not used to disconnect drive mappings.
NET SESSION is used to list the active connections on a system that hosts shared folders and is not used to map drives or disconnect from mapped drives.
NET USE is the command you want to use here. NET USE is used (no pun intended ) to map drives to network shares and disconnect from those mappings. The /delete argument of the NET USE command will disconnect the drive mapping. |
|
|
|