Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get path to a directory
Message
De
12/12/2001 16:53:54
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00593473
Message ID:
00593586
Vues:
34
The problem is though that I don't know if the directory 'progs' is a subdirectory of profiler or pro32. I do know that it is no more than 4 levels deep so I finally came up with the following:

DO CASE
CASE DIRECTORY(sys(2003)+'\'+'progs')
thisform.pdir=FULLPATH(sys(2003)+'\'+'progs')
CASE DIRECTORY(sys(2003)+'\'+'..\progs')
thisform.pdir=FULLPATH(sys(2003)+'\'+'..\progs')
CASE DIRECTORY(sys(2003)+'\'+'..\..\progs')
thisform.pdir=FULLPATH(sys(2003)+'\'+'..\..\progs')
CASE DIRECTORY(sys(2003)+'\'+'..\..\..\progs')
thisform.pdir=FULLPATH(sys(2003)+'\'+'..\..\..\progs')
OTHERWISE
thisform.pdir=FULLPATH('progs')
ENDCASE
It's not pretty, but it works.
Thanks all for your help!
Tracy
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform