Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What am I doing wrong with this CHDIR?
Message
De
25/09/2005 12:49:01
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01052847
Message ID:
01052852
Vues:
8
This message has been marked as a message which has helped to the initial question of the thread.
>I have a routine where user selects a file using GetDir() function. I would like to store the drive+directory before calling GetDir() and then restore it back to that directory
>
>I tried the following:
>
>cCurrDir = sys(5) + sys(2003)
>GetDir()
>CHDIR cCurrDir
>
>
>But I get error "Invalid path or file name" on the CHDIR line.
>
>My questions are:
>1. What is wrong with my syntax of CHDIR?
>2. Would I be better off using SET DEFAULT TO (cCurrDir) instead of CHDIR?
>
>Thank you in advance for any suggestions

This is not necessary, GetDir() don't change the current directoty.

hovewer:
cCurrDir = SET("DIRECTORY")
getdir()
chdir (cCurrDir)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform