[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

move lotus notes folder to an other database

Posted on 2006-04-03
19
Medium Priority
?
3,367 Views
Last Modified: 2013-12-18
hello,

I need to move a folder from an user database to an other database.
When I open the option move database in lotus notes client, I don't have acess to other database open in lotus notes.
If you know the method to do this on lotus notes or a program it capable to do this.
I use lotus notes 6.5.1

best regard
0
Comment
Question by:PLEONAmando
  • 5
  • 5
  • 4
  • +1
17 Comments
 
LVL 22

Expert Comment

by:mbonaci
ID: 16359563
Hi PLEONAmando,
you need to move folder with all documents from one LN database (.NSF) to the other?

Marko
0
 

Author Comment

by:PLEONAmando
ID: 16359663
hi,

Yes, I have to move one folder, with subfolder and documents to one base xxx01.nsf to an other base xxx02.nsf.
0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 336 total points
ID: 16359770
You have to create those new databases first, with the right template (StdR6Mail I suppose). Then you can go in a folder and select all mails present, Edit/Cut, go to the new database, Edit/Paste.

A folder in Notes is "nothing". Mail documents are not "in" a folder, but instead a document is labelled with "I'm in folder X". Consequence: you cannot copy a folder, but you can copy its content.
0
Technology Partners: 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!

 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16359774
Maybe it's easier just to copy the existing mail database to two new databases, and then remove the unwanted documents?
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 16359786
PLEONAmando,
do you want to do it once or you need that as a feature (an action that does that so you can use it many times)?

Marko
0
 

Author Comment

by:PLEONAmando
ID: 16359862
I a newbie in notes administration, I am an Exchange administrator.
And I am surprised that such a simple operation under exchange (open the two base an drag an drop the folder), that is so complicated under notes.


This folder is "client" and have more than 50 subfolders and the size base is 2,6 Gb, the two solution are not the fastest, but if I don't have an other solution.

For the moment once, but if I have to do the same an other time I'm prefer to have an automate solution.



0
 
LVL 22

Assisted Solution

by:mbonaci
mbonaci earned 332 total points
ID: 16360192
PLEONAmando,
This code will ask you which folders you want to move and after that it will ask you to which database you want them moved.

First create the copy of your db that contains folders and open that copy in designer and follow the procedure:

Create new agent in the db where the folders are now.
Paste this code in Initialize event of the agent:

Sub Initialize
    Dim s As New NotesSession
    Dim w As New NotesUIWorkspace
    Dim dbSource As NotesDatabase, dbDest As NotesDatabase
    Dim source As NotesView, dest As NotesView
    Dim vc As NotesViewEntryCollection
    Dim docDest As NotesDocument
    Dim ve As NotesViewEntry
    Dim folders() As String
    Dim i As Integer
    Dim ret, rez
   
    Set dbSource = s.CurrentDatabase
   
    Forall v In dbSource.Views
        If v.IsFolder Then
            i = i + 1
            Redim Preserve folders( i - 1 ) As String
            folders( i - 1 ) = v.Name
        End If
    End Forall
   
    ret = w.Prompt( PROMPT_OKCANCELLISTMULT, "Folder selection", "Select one or more folders to move.", folders(0), folders )
    If Isempty( ret ) Then
        Messagebox "User canceled", , "Folder not selected"
        Exit Sub
    Else
        Forall f In ret    
            Set source = dbSource.GetView( f )
            Set vc = source.AllEntries
           
            rez = w.Prompt( 13, "Database selection", "Choose the database to move the folder to" )
            If Isempty( rez ) Then Messagebox "User canceled", , "Database not selected" : Exit Sub
           
            Set dbDest = s.GetDatabase( rez(0), rez(1), False )
            Call dbDest.EnableFolder( f )
           
            Set ve = vc.GetFirstEntry
            Do Until ve Is Nothing
                Set docDest = ve.Document.CopyToDatabase( dbDest )
                Call docDest.PutInFolder( f )
                Set ve = vc.GetNextEntry( ve )
            Loop
           
            Call vc.RemoveAllFromFolder( f )
            Call source.Remove
        End Forall
    End If
End Sub



Then create the new empty (ctrl+n) db (which you'll select after, when the code asks you for the destination db).
To test the code open the created copy of folders db and choose from toolbar Actions - <name of the agent>


Hope this helps,
Marko
0
 
LVL 1

Assisted Solution

by:Rickhal
Rickhal earned 332 total points
ID: 16371362
I don't believe this action should be that complicated. I have done this in the past many times. Really, all you need is manager access to database B. Create the folder structure in database B. Then go back to the original folder and it's sub folders and just copy and paste the data from the original folder and sub folders to database B in the same folder names. That is one way to do it. You could also replicate the folder into database B using a replication formula. First you would go to replication settings on database A (where the folder resides that you want to copy over to the other database) and go to replication settings. On the Basics tab you would select to "sent documents to server" (presumably you have the other database on a server) and then on the advanced tab select "Docunents in specified views or folders". Then you would go to the folder you want to move over and select it by highlighting it. Close the replication settings dialog box and then go to replication. Select "replicate with options" and then choose "send only", then replicate with database B. That should create the folder and it's sub folders in database B. You could choose to do it the other way and recieve selected views and folders from database A to pull into database B. Or, you can try the code above. Good luck!
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16381451
> I don't believe this action should be that complicated.
Your method seems pretty complicated if you ask me...

And, A and B would be replica databases. If that's not intended, then you may need to copy a database after all (in Notes, to get a new replica-ID).
0
 
LVL 1

Expert Comment

by:Rickhal
ID: 16382982
You are entitled to your opinion. And I know that you get a new replica ID with a new copy (there are tools out ther to modify the replica ID). Not sure why you mention that as all I am saying is that he could replicate the folder he wants and it's sub folders only into the other database. But, thanks for you comments anyway.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16383649
No offence meant.

Some feedback from PLEONAmando would be nice, though...
0
 
LVL 1

Expert Comment

by:Rickhal
ID: 16384062
none taken, for any given problem there is usually more than one approach that will work. I was really referring to another suggested solution. And yes, I agree some more feedback from the original poster of the question would be good.....Also, I think I might have misunderstood the question/not enough info to really get a grasp on it....as well.
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 16393397
Rickhal,
if you're talking about my solution, it's far less complicated then yours (maybe it seems complicated to you cuz of copying the db, but that's only the precausion).
It comes down to creating an agent and pasting the code.

If he uses selective replication, as you suggested, then it will have to be replica (as Sjef mentioned).
You talk about complications and then you mention changing the replica ID :)

By the way, you don't need tools for that:
Declare Function NSFDbReplicaInfoSet Lib "NNOTES" Alias "NSFDbReplicaInfoSet" ( Byval H As Long, R As ReplicaInfo) As Integer
;)

Marko
0
 
LVL 1

Expert Comment

by:Rickhal
ID: 16393873
Marko, as a newbie administrator (which PLEONAamando said he is) I had the thought that perhaps writing an agent (or copying your code) and getting it to work might be a bit much for him to attempt. As I also stated, I don't think I had a good grasp on what he was trying to do. For example: is the second dB a replica of the first one (w/same rep id) or is it a copy? The information provided in his post is not very detailed. So, that is why I offered a solution that might seem simpler to him. My solution(s) are quite simple if you know your way around Notes. As for changing replica ids, I prefer a simple tool rather than writing code to accomplish that. But, each to his/her own.......
As far as I'm concerned, I'm done with this question now. So, no need to chastise me any further, ok?
0
 

Author Comment

by:PLEONAmando
ID: 16398480
sorry for my absence of response.
I had an accident with my tendon of Achilles by making sport.
I would be back to work the next week, and I could test yours solutions at this time.

regards
0
 
LVL 1

Expert Comment

by:Rickhal
ID: 16399884
Sorry to hear that, PLEONAmando. Well, you have a variety of solutions to try. Good Luck.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16399941
That's bad. What's the sport? Squash is "famous"...

Hey Rickhal, don't give up too soon. I think your (or anybody else's) point of view is very valuable and I read all contributions. Sometimes I'm wrong, jumping to conclusions when I didn't read the question or the posts carefully enough. Sometimes I think I read the question better, so I try to defend my point. Quite often though, the question is hard to "read", whatever the reason is. In time, one developes a 6th sense for question reading, between the lines, under the ink, wherever. There's no need to defend yourself as no attacks were made.

I think we both tripped over your sentence "I don't believe this action should be that complicated", in which we assumed that "this" referred to one of our remarks. And indeed the question is foggy...
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Integration Management Part 2
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

872 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