The source file is the share info pulled out of the Registry and is in the form shown below. What I am trying to do is to extract the sharename and Share path and then check for the existance of the directory. The complete script is as follows.
Dim MyString, myarray, myarray2, myarray3, myarray4, Msg, strShareName, strSharePath, objfolder2, fso, obshell
set objfso = createobject("scripting.filesystemobject"

set objshell = createobject("wscript.shell"

'objshell.Run "%Comspec% /C Reg query HKLM\system\currentcontrolset\services\lanmanserver\shares \\server1 > c:\shares.txt"
set objtextfile = objfs

penTextFile ("c:\shares.txt"
Do while not objTextFile.AtEndOfStream
Mystring = objTextFile.Readline
''''''''' The following statements split the string up into arrays
MyArray = Split(MyString,"=", -1, 1 )
mystring2 = myarray (2)
myarray2 = split(Mystring2,";", -1, 1)
mystring3 = myarray (0)
myarray3 = split(mystring3,"maxuses", -1,1)
mystring4 = myarray3 (0)
myarray4 = split(mystring4,"MULTI_SZ", -1,1)
strSharePath = Myarray2 (0)
strShareName = Myarray4 (1)
''''''''''' Myarray4 (1) = sharename
''''''''''' Myarray2 (0) = share path
if objfso.FolderExists(strsharepath) then
wscript.Echo "This folder exists"
else
wscript.Echo "This folder does not exist"
end if
loop
: Below is example of source file
MULTI_SZ REPO$ MaxUses=4294967295;Path=C:\PROGRA~1\NETWOR~1\MANAGE~1\Disks;Permissions=7;Remark=NTME Repository;Type=0
MULTI_SZ MEUPGD$ MaxUses=4294967295;Path=C:\PROGRA~1\NETWOR~1\MANAGE~1\Disks\Upgrades;Permissions=7;Remark=NTME Update Daemon Directory;Type=0
MULTI_SZ ExtraDAT MaxUses=4294967295;Path=D:\Extra DAT;Permissions=0;Remark=;Type=0
MULTI_SZ Quarantine MaxUses=4294967295;Path=D:\Quarantine;Permissions=127;Type=0
MULTI_SZ MENPClient32 MaxUses=4294967295;Path=C:\Program Files\Network Associates\Management Console\NP250\32;Permissions=127;Type=0
MULTI_SZ SuperDAT MaxUses=4294967295;Path=D:\Super DAT;Permissions=0;Remark=;Type=0
MULTI_SZ Alerts MaxUses=4294967295;Path=D:\Alerts;Permissions=127;Remark=Anti Virus Alerts;Type=0
MULTI_SZ RLog MaxUses=4294967295;Path=D:\Remote User Logs;Permissions=127;Remark=Remote Access Log File;Type=0
MULTI_SZ DRSOLSAVTK MaxUses=4294967295;Path=D:\Dr.Sols AVTK\8.02 95;Permissions=127;Type=0
MULTI_SZ MCON MaxUses=4294967295;Path=C:\Program Files\Network Associates\Management Console;Permissions=127;Type=0
MULTI_SZ deploy$ MaxUses=4294967295;Path=C:\Program Files\Network Associates\Batch;Permissions=0;Type=0
MULTI_SZ SPM2000C$ MaxUses=4294967295;Path=C:\;Permissions=127;Remark=Created by SPM2000;Type=2147483648