How to find files on a hard drive or mapped network with LotusScript

Place this abridged LotusScript code into a button to quickly drill down and locate Lotus Notes files on either a hard drive or a mapped local drive.

Related resources from SearchDomino.com:
Tutorial: 30 LotusScript tips

Top 10 LotusScript tips

LotusScript Reference Center

I wanted to locate a file on either my hard drive or a mapped network drive and import the data into a Lotus Notes database. Because I had already found the code to do the import, I abridged my LotusScript code to provide just the file selection routine, which can be placed in a button or view action.

Placing the LotusScript code in a button gives the Notes user a choice of drives (it defaults to the C: drive, as seen in Figure 1).


Figure 1. Identify the drive you want to select the file from.

Lotus Notes users then receive a list of folders and files matching a pattern, for example .xls. However, this can be changed.

There also is an abort/cancel option at the top of the list that lets you drill down into the next directory to locate the relevant file. An option to move back to the root is also provided as Lotus Notes users drill down into directories. You should select "..", in case a user drills down into the wrong route and cannot find the required file.


Figure 2. Select the file.

Once the file is selected, the full drive, path and filename are returned and displayed on screen (as seen in Figure 3).


Figure 3. The full drive, path and filename are displayed as the selected file.

LotusScript to locate files
(Click on code for enlarged view and script download.)

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Jerry Eaton. Let others know how useful it was using the rating scale below. Do you have a helpful Lotus Notes Domino tip or code snippet to share? Submit it to our monthly tip contest to be entered to win a prize.

This was first published in July 2008

Dig deeper on LotusScript

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close