Folders (Filesystem) & Import into Db

I have used databases (e.g. Sandbox for images) that allow you to access files on the filesystem + import into Db. Is this possible to do and keep folders intact? e.g. We have a directory link to c:\clients. The clients folder contains folders and subfolders relative to customers. e.g. below…

\clients

…\clientA

…\clientA\project1

etc…

I need to pull these static files into a Db and retain the folder structure. Any ideas?

Subject: Folders (Filesystem) & Import into Db

You can mimic the folder structure when you pull the files into the database. For instance, if you have the structuredir/buttons.gif you can import buttons.gif as an image resource, then edit the resource and change the name to dir/buttons.gif to incorporate the structure. Accessing the resource would then be done like so:

http://servername/dbname.nsf/dir/buttons.gif

This should work for other file types as well.

If you are importing into documents instead of image resources, you can do something similar by creating a view that is sorted with the first column as your key. There is an example (I think in the sandbox, though I don’t recall where we found it last year) that uses response documents to hold pictures for use in html pages that creates a structure like so:

where the first dignityuwear-etc is the name of the field used in the sorted column (it’s default is to use the name of the imported file). Webimages is a view that holds these documents.

Subject: Folders (Filesystem) & Import into Db

What do you mean ‘retain the folder structure’? You can only import/attach unique files, not directories, into a Notes doc so what would you need to see/have to have retained the structure?

Doug

Subject: RE: Folders (Filesystem) & Import into Db

Thanks… need to clarify a bit. At the moment, the docs are organized on the filesystem using customer name then subdirectories with project name, etc… Files are stored in these folders, etc… People know to goto the customer folder and select the project name. I was wondering if an import could create folders/sub-folders based on the same hierarchy.

Subject: RE: Folders (Filesystem) & Import into Db

You could so this using a script, if what you are looking to do is import a document, and then place it in a “folder”. You’d need to write a lotusscript action to read the path of the chosen file using the Dir$ function, check to see if the folder structure already exists (if those categories exist in the view in the order they are in the folder structure), and if not, set the fields on the document you create at this point so that the structure is added to the document, and then import the file from the file system.

Subject: RE: Folders (Filesystem) & Import into Db

Thanks Joel… will test -w- Dir$. I appreciated all postings.

Subject: RE: Folders (Filesystem) & Import into Db

Well I am in a similar bind.

I have data on a drive that exists in a similar folder structure:

Z:\OpsDat\Machine Name\xyz.txt

Where ‘xyz.txt’ is a set of 6 or 7 different criteria, but all of which are common to every machine.

What I’d like to do is:

1 - Import a flat file of the directory structure into a Discussion-style DB to use the “Machine Name” as main documents, and the 6 or 7 criteria doc’s as Response documents:

V Machine Name 1 <— This is a ‘twistie’ or category

 Criteria 1           <\

 Criteria 2               \

      "                        \

      "                          --- These are the Response doc's

      "                        /

      "                      /

 Criteria 7           </

2 - Import the small text files in the “\Machine Name” folders into each of the criteria (Response) docs.

I have read so many different things that my head is absolutely swimming, and I’m more an Admin than I am an App Developer. If anyone would be so kind as to push/shove me in the right direction, I would be eternally grateful!

Thanks in advance everyone!