Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Restricted Putfile() ?
Message
From
17/04/2000 20:22:55
 
 
To
17/04/2000 14:10:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00360527
Message ID:
00360692
Views:
10
>OK, Here's the problem. I need to give my users the ability to save/export files, graphs etc. to network drives - but limit their ability to rename, delete, or otherwise cause bad things to happen where they shouldn't (bad,bad users !)
>
>Gotta believe this has been asked and/or done before but getting greyer looking - Could someone loan me a clue ?
>
>TIA .....

You could use GETDIR() to let the user select just a folder/directory, then use a file name that YOU specify:
FUNCTION MyWriteFile
LPARAMETERS tcSourceFileNameWithPath, tcOutputFileName

LOCAL lcFolder
lcFolder = GETDIR()

IF NOT EMPTY(lcFolder)
  COPY FILE (tcSourceFileNameWithPath) TO (lcFolder + tcOutputFileName)

ELSE
  * User cancelled, do nothing

ENDIF

RETURN
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform