Hello Monks,
I'm trying to download a Lotus Notes database from a server. Thererfore I found the excellent program here. With this program I'm able to download all the files from this database.

My problem now is, that the database is build like this: database -> folder -> subfolder1 -> subfolder2 -> files
and if I just download it then it is stored like this: \Notes2Files\folder\all_the_files but if possible I would like to have it in the same style as the database is build itself, including the subfolders.
And I'd also like to download only particular folders

# Loop over all of the folders foreach my $viewname (GetViews($database)) { # Continue only for one folder if ($viewname eq "folder") { # Get the object for this View print "Saving Messages in folder $viewname..."; my $view = $database->GetView($viewname);
... what can be easily done with the "if - question".

Now my idea was to insert another "foreach" loop after this "if - question" to check for the next sublevel of my database. Unfortunately a simple  foreach my $subview (GetViews ($viewname)) creates an error like:  Can't use string ("$viewname") as a HASH ref while "strict refs" in use at test.pl line XX.
I looked at the value that $database contains at the first loop, but Win32::OLE=HASH(0x1978a3c) doesn't really help me. So, I don't understand in the moment how I can deal with this problem or what I have to do to make to program rum.

Maybe someone can help me out with a good idea or simpely the syntax of the "foreach" loop ;-)

Thank you very much in advance

Tobi

I'm using Perl v.5.8.4 under WinXP with Lotus Notes 5.0.11


In reply to Downloading from a Lotus Notes database by Toby80

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.