Solved

creating a directory on the server with lotusscript

Posted on 2001-08-30
8
2,017 Views
Last Modified: 2013-12-18
hello

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

Thank's a lot

Paul
0
Comment
Question by:pvandelouw
8 Comments
 
LVL 4

Expert Comment

by:sloeber
ID: 6440000
you can use MkDir in LotusScript
0
 
LVL 4

Expert Comment

by:sloeber
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
0
 

Author Comment

by:pvandelouw
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.

server:

deltacare_nts/deltacare

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

greetingz Paul
0
 
LVL 4

Expert Comment

by:sloeber
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
"\\servername\directoryname\"

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.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 4

Expert Comment

by:sloeber
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"
0
 
LVL 4

Expert Comment

by:martijnmulder
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
errorHandling:
     Print "Attachment.CreateAttachment reports:"
     Print Cstr(Err) & " " & Error$
     Resume Next
errorFatal:
     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
0
 
LVL 13

Accepted Solution

by:
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)
or:
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 *
0
 

Author Comment

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

greetingz Paul
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now