?
Solved

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

Posted on 2008-06-11
2
Medium Priority
?
2,273 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
CRAK earned 1200 total points
ID: 21763109
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 800 total points
ID: 21764218
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

752 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