Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check permissions 1

Status
Not open for further replies.

jimstarr

Programmer
Feb 6, 2001
975
US
Using GETDIR() the user selects a destination folder in which to back up his data. What's the simplest way for me to check if he has permission to write to this folder?

Jim
 
The usual way would be to have the user's Network Administrator set up access to drives/directories based on the user's rights.

In that way, if they can 'see' it, they can use it.
If they cannot 'see' it (i.e. cannot map their system to it), they cannot use it.

Another more 'kludgy' way would be to attempt a 'test' write to the directory prior to the backup write.
If the 'test' write was successful, then the backup should be as well.
If the 'test' write failed, then alert the user to try elsewhere.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top