creating a directory on the server with lotusscript

Posted on 2001-08-30
Last Modified: 2013-12-18

How can I create a dir with lotusscript on the server, from a client, or isn't this possible.

Thank's a lot

Question by:pvandelouw
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 6440000
you can use MkDir in LotusScript

Expert Comment

ID: 6440007
Here's an example
MkDir "c:\paul"
Create directory paul, in the root directory of drive C.

ps : but be carefull, if you run the agent or so, from the server, he create's the directory on the c drive from the server and not your local c drive

Author Comment

ID: 6440020
OK I have read about de MkDir function, but the agent is run locally, and i want to create a directory on the server in his data directory. Is this possible or do i have to move the database to the server.

for example.



on this server i want to create the directory, "test" How can i do this.

greetingz Paul
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 6440057
I don't think that's possible.
The easiest way is to copy the database to the server.
You can try to make a directory on the server, but if you want to make a directory on one of the local drives from the server, it isn't possible, if you're working local.
if you want to make a directory on the server, try this

But, if your server is running on NT as a service under the 'system' account then it wont be able to 'see' network resources (even if you can see them when you log on).

Apparently it is a deliberate security restriction to disallow any 'system' services network access.

The work arround is to go into the services section and tell the Domino service to run under a user id.

Expert Comment

ID: 6440181
If you're working under nt, you can try to map the c drive from the server, and call it the P drive are something like that.
mkdir "p:\test"

Expert Comment

ID: 6440346
you have to make it a bit more error proof than that. you can use something like this:

     On Error Goto errorDir    
     Call emAtt.ExtractFile( path$  & fileName$)    

     On Error Goto errorHandling

     Exit Sub
     Print "Attachment.CreateAttachment reports:"
     Print Cstr(Err) & " " & Error$
     Resume Next
     Print "Attachment.CreateAttachment reports fatal error:"
     Print Cstr(Err) & " " & Error$
     Exit Sub
errorDir:' <- called if extract file fails
     On Error Goto errorMkDir
     Print "Error when extracting file: " & fileName$ & " to directory: " & path$
     Print "Creating new directory: " & path$
     Mkdir path$
     On Error Goto errorFatal
     Call emAtt.ExtractFile( path$  & fileName$) '<- try to extract again
     Resume Next
errorMkDir: <- called it MkDir fails
     Msgbox "Unable to create directory: " & path$ & Chr(10) & "Please make sure this directory does not exist and" &_
     Chr(10) & "that the disk is not full.  If the problem continues, try changing the directory to D:\.  You must exit Notes" &_
     "for changes to take effect.", MB_ICONIFORMATION, msgTitleError$
     Exit Sub
End Sub
LVL 13

Accepted Solution

CRAK earned 100 total points
ID: 6443819
What are you trying to store in that dir? A database?
In that case, use:
NotesDatabase.CreateCopy(Server, Path)
NotesDatabase.CreateReplica(Server, Path)

Just like it happens when you do so through the File-menu, any non-existing dir's should be created automatically.
* not tested *

Author Comment

ID: 6443968
thanks alot. I creates i directory just as simple as that.

greetingz Paul

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question