Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Restricted Putfile() ?
Message
De
17/04/2000 20:22:55
 
 
À
17/04/2000 14:10:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00360527
Message ID:
00360692
Vues:
9
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform