Without going into specifics, I had a similar problem where I had to verify that I was in a specific directory before I did an automated delete operation. What I did was echo the output of the command prompt to a file and then compare the file with a matching text file using the fc command. If it matched, then I proceeded. You should be able to do the same thing. I pasted in the relevent piece of the batch file below so you can get the general idea.
Hope this helps. Dan . . . rem ** Verify Proper working directory cd >> c:\util\qxferdel\qroot.txt echo The Present Working Directory is: type c:\util\qxferdel\qroot.txt echo. echo File Compare with C:\util\qxferdel\qroot.ref echo. fc /L C:\util\qxferdel\qroot.ref C:\util\qxferdel\qroot.txt if errorlevel 1 goto abort if errorlevel 0 echo You are in the proper directory Dan Arsenault Network Administrator Siemens VDO Automotive Inc. 700 Park Avenue East Chatham, Ontario, Canada Voice: 519-436-3839 Fax: 519-436-3641 Email: [EMAIL PROTECTED] The message is intended only for the use of the intended recipient(s). It is confidential and may also be privileged and/or exempt from disclosure under applicable law. If you are not the intended recipient(s), you are hereby notified that any review, retransmission, conversion to hard copy, copying, circulation or other use of this message is strictly prohibited and may be illegal. If you are not the intended recipient(s), or have received this message in error, please notify the sender immediately by return E-mail and delete this message. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charles Alexander Sent: Monday, May 10, 2004 3:46 PM To: '[EMAIL PROTECTED]' Subject: [WhatsUp Forum] How to map a network drive and see if it was successful Hi! Does anyone know how to map a network drive and see if it was successful in WUG? I would like to call a batch file (using a net use command) and see if "The command completed successfully." was returned. Thanks! Charles R. Alexander System Administrator Quantum Corporation 719-536-6405 8301-6405 Please visit http://www.ipswitch.com/support/mailing-lists.html to be removed from this list. An Archive of this list is available at: http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/ Please visit http://www.ipswitch.com/support/mailing-lists.html to be removed from this list. An Archive of this list is available at: http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/
