Solved

How to check via LotusScript if the current user has access to a specified drive and path ?

Posted on 2008-06-11
2
2,166 Views
Last Modified: 2013-12-18
Hi All,

I need to check with LotusScript if the current user has access to a specified path before contninuing the run of the script.
For example : by checking if he can access this directory "R:\OPS\ABC\Teams\Dev\IDN" and subdirectories.
How can I do that ?
Thanx for any help.
0
Comment
Question by:giggina
2 Comments
 
LVL 13

Accepted Solution

by:
CRAK earned 300 total points
Comment Utility
You could use Dir to check if the dir is available/accessible to the user.
If the user is supposed to read a file, consequently try that. If he/she needs to write a file, give that a try. If you're unfamiliar with that, check designer help on "Open".
Do all that in a separate function with built-in error trapping (on error goto..). Return e.g. true if all went well, or false when not.
0
 
LVL 7

Assisted Solution

by:olaraak
olaraak earned 200 total points
Comment Utility
Yes, Run-time errors give plenty of information about failed file operations, for example:

File not found
Bad file mode
File already open
Device I/O error
File already exists
Bad record length
Disk full
Bad file name
Device unavailable
Permission denied
Disk not ready
Cannot rename with different drive
Path/file access error
Path not found
File not writable
File not readable
Illegal file number
File not open
Unable to open file
Illegal operation for file mode

... and others.

You can also set different error handling routes, depending on error code, to take specific actions.


Function DoSomethingWithFile()

 ' Error trapping

 On Error Goto catch
 

   ' ---

   ' File-handling code

   ' ---
 

  Exit Function ' To avoid error message during normal execution

catch:

  Print "Error in Function ""DoSomethingWithFile"": "  & Str(Err) & " " & Error$ & " on row " & Cstr(Erl)

  Exit Function

End Function

Open in new window

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

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…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 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

16 Experts available now in Live!

Get 1:1 Help Now