(Quote) default the VPHOME is not a hidden share
In fact I typed the code from memory.
Of course you're right - the line should be ...vphome$$... as it is in the real script.
VPHOME is a hidden share!
As long as I was doing "If EXIST ($ROCPATH)" the returncode led to believe that the directory didn't exist - And I made sure personally that the path existed and that there was a file to grab contained in it.
The script _always_ went to "else do..." and never to "do ..."
That made me try a bit the way you seem to not like (try&error)
----------------------------code--------------------------
$Rocpath="\\Server\Share"
If Exist ("\\Server\Share\")
do stuff
else do other stuff
endif
----------------------------code--------------------------
is not the same as
----------------------------code--------------------------
$Rocpath="\\Server\Share"
if Exist ($Rocpath)
do stuff
else do other stuff
endif
----------------------------code--------------------------
Provided there is a server named "server" with a share named "share" my first piece of code found that the path existed and "did stuff" while the second piece of code always went to "else do...."
Like I said I thought that maybe I was checking on the mere existance of $Rocpath as long as the variable was in brackets.
Like I said I circumvented it by
----------------------------code--------------------------
$Rocpath="Server\Share"
If Exist (\\)+$Rocpath
do stuff
else do other stuff
endif
----------------------------code--------------------------
This last bit "did stuff" as long as $Rocpath is valid and "else do..." if it wasn't.
Works fer me but looks a wee bit awkward if ya catch my drift.
Rob
_________________________
Serenity: You can't stop the Signal!