we are getting an intermittent error when using wntAccessMod on a distant share (trans Atlantic). I suspect this is a timing issue. Can you suggest a way to make the code more resilient.
Full_path=\\xxxx.eu.xxx.com\GBR2\bnp\General_STAR_Compound\web67eu\Macros\Archive Parm File=
Error Line:=rc = wntAccessMod(sa_filesrv,pathdir,300,2,0)
Error Line Num:=323
Script Name:=C:\STAR\STAR_Development\Bin\mkprot_2.wbt
Error Desc:=546: Invalid file/directory name
Variable:=rc
Additional Info:=
Have you considered first Pinging the server? There are a number of ways to accomplish this using WinBatch. We offer three extenders that offer ping functions. IpGrabber Extender function ipPing(), WinInet Extender function iPing and Winsock extender function wxPing.
Here is a WinInet extender sample:
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/Samples~from~Users/Network+Check~for~Server~Connectivity.txt
You might also want to add code to check for the existence of directory ( DirExist ) or File (FileExist) before you attempt to call WntAccessMod.