Lotusscript Dir$ giving "illegal function call" with UNC path

68 Views Asked by At

Was getting error "illegal function call" using Dir$() in Lotusscript with a UNC path (\serverName\shareName*)
This was only happening in the Test environment

When troubleshooting tried a dir at a cmd prompt, and got following error
c:> Dir \serverName\shareName\dirName

"No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept."

When I tried this on a different share there was no problem, which is how I found the solution.

SOLUTION - See first answer below
(Logging this in case anyone else gets the issue)

1

There are 1 best solutions below

0
Rich7716 On

Solution:
The share on the Windows server had a limit of 3 on number of connections
(Folder Properties / Sharing / Advanced Sharing = "Limit the number of simultaneous users to: 3" )

Not sure why attempting to do a Dir$ seemed to push it past the limit!
but upping the connection limit on the Share solved the problem.

When troubleshooting also got the following error at a cmd prompt
c:> Dir \serverName\shareName\dirName

"No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept."

(was ok with a different share, which is how I found the solution)