Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any way to specify working directory with 'run' command?
Message
De
28/10/1999 13:14:32
 
 
À
28/10/1999 12:32:25
Allen Hanna
H. A. Hanna Associates
Indianola, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00282962
Message ID:
00283206
Vues:
19
>>Is there any way to specify the working directory when using the
>>run command? Working directory meaning that which you would
>>specify in a windows shortcut as 'start in'.
>>
>>Thanks!
>>Joe
>
>Joe,
>
>You could create a batch file and run the batch file from fox. For example,
>mybatch.bat could contain the following:
>
> cd \newdir
> myprogram.exe
>
>Or, any combination of dos commands to go where you want and do what you want. You could even use foxpro logic to create the batch file before fox runs it, although that might be a more complicated way to go.
>

If you're going to invest time in scripting an external executable, learn the Windows Scripting Host; it provides considerably more capability than a batch file (you have both VBScript and JScript available, and a bunch of COM automation capabilities), and you don't get stuck with a DOS box or the need to create PIF files.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform