DIR Function

Hello i am using following code in the agent.
   but it  gives me error "Illegal function call"

 filename$ = Dir$("\\Lbriggi\dds-ljb",16)
     Msgbox(filename$)

where "Lbriggi" computername in network
and "dds-ljb" is  share directory name.

any comment wold be appreaciated.

Thanks,
shrirang
shrihalbeAsked:
Who is Participating?
 
zvonkoCommented:
not sure, perhaps you have to use the mounted device leter, like this:
filename$ = Dir$("Z:\dds-ljb",16)
Msgbox(filename$)
0
 
zvonkoCommented:
When you start the Domino server as service, than it is running under the system userid named SYSTEM.
This user does not have the shared fileservices mounted untill you mount it explicitly.

I have not testing environment at the moment, but think you can try this sequence:
rc = shell("NET USE Z: \\Lbriggi\dds-ljb topsecret /USER:domainname\username /PERSISTENT:YES")
filename$ = Dir$("\\Lbriggi\dds-ljb",16)
Msgbox(filename$)

Good luck,
zvonko
0
 
CRAKCommented:
You said you run the code in an agent.
Well.... "Dir" contacts OS-level data; that's beyond the control of Notes, so you'd need pivileges to run "unrestricted agents". (Everything controlled by notes requires "restricted access")
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
shrihalbeAuthor Commented:
Hello crak,
 i have tested it as action button code but it still didn't work.
thanks,
shrirang
0
 
CRAKCommented:
Have you tried zvonko's solution: assigning a driveletter to the server? It makes sense to me!

And I don't like asking, but have you taken notice of platform differences (or are you running Windows server and clients)?
0
 
shrihalbeAuthor Commented:
write now i have appl on my local machine  and i am using the windows ME.  

thnaks,
shrirang
0
 
CRAKCommented:
Perhaps it's easier to look for just any file first (like Dir$("c:\*.*", 8) and then change things bit by bit: a dir instead of a file, a specified dir. or file etc. and in the end translate it to a server situation).
That should bring up something!
0
 
shrihalbeAuthor Commented:
Helo zvonok,

thanks for help

shriang
0
 
shrihalbeAuthor Commented:
thanks
shrirang
0
 
zvonkoCommented:
Thank you shrirang for the points :-)

can you please give a short feedback wath the final solution was.

Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.