Author Topic: error 546: Invalid file/directory name on a remote share  (Read 2259 times)

rmelcher

  • Newbie
  • *
  • Posts: 7
error 546: Invalid file/directory name on a remote share
« on: November 19, 2013, 08:55:05 am »

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:=

Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: error 546: Invalid file/directory name on a remote share
« Reply #1 on: November 19, 2013, 09:14:30 am »
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.
Deana F.
Technical Support
Wilson WindowWare Inc.