I’m trying to figure out how to get a list of just directories on a Domino server. @Prompt([CHOOSEDATABASE]) almost works except I have to select a file rather than stop at the directory level. This could be worked around by selecting the first file and trimming off the filename, except that some directories don’t have a single file. So SaveFileDialog seemed like it might work since I can only select directories. But how do I select or work on a Domino server instead of just the “Windows” local paths? Also, is Dir$ only for local or can that also be server directed?
Or am I approaching this all wrong? What I want to do is allow a user to select a directory/folder on a domino server for a routine to cycle through those files/databases in that folder and subset of folders/files looking for different design elements. I have the notesnotecollection working well.
The user is selecting the server or it can be hard-coded.
Thanks in advance
Subject: RE: SaveFileDialog, Dir$, etc. help
As you might expect for security reasons, Notes client users do not by default have access to the file system on the Domino server. They can’t be allowed to have a regular file browsing dialog into the server’s Data folder because that would let them select individual nsf files (or subfolders containing nsf files) that they aren’t supposed to have access to based on the ACL, and copy/paste them onto their local hard disk without even causing any logging activity on the server.
If you have access to map a network drive to the server, you can use the mapped drive to browse the server folder structure.
Otherwise (or if you don’t like this approach) you can try to find out the NNTP-based API functions that the Notes client uses to present the database selection dialog, and use these same calls to pull out the information you need and create your own dialog. Unless you’re creating a product, I doubt this will be worth the effort.
Why do you want to do this? If you describe the application, it’s possible someone will know a better way to do it. Why do you want to select folders that contain no database?
Subject: RE: SaveFileDialog, Dir$, etc. help
Thank you for the response…this is good information.
I have written an agent for our Notes Admin where he can select a number of databases through the @Prompt([ChooseDatabase]), then the agent goes through those databases and makes a collection of design elements that have not been signed by him, so that he can sign them if needed. This works great. However, he wants to select only a folder on the server and then the agent works on all the databases in that folder (that may not have any databases because it serves as a parent directory with the databases in the subfolders) and subfolders. For instance, in the structure App/Test/databases, App/Prod/databases, he would select App/ and then the agent would run on Test and Prod. (There are no dbs under App as it serves as a parent directory.)
But I think I will go back to my original thought using @Prompt([CHOOSEDATABASE]) and have him pick the first database and strip off the database and build the database collection. He will just need to kick off the agent two times. No big. I just wanted to know if there was way to only access the folder rather than have to select a database.
I think I am going to go back to my original thought and have the admin
Subject: RE: SaveFileDialog, Dir$, etc. help
Hi!
If i understood you correctly you’ve used @Prompt([CHOOSEDATABASE]) to get all databases in certain directory.
Is it possible to paste that part of code? I need to get collection of databases in certain directory and then replicate those databases.