Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running md5sum from a batch file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00893265
Message ID:
00893306
Vues:
15
>I'm trying to run the file checksum program md5sum.exe from a batch file that is created on the fly in a Foxpro 7.0 program. The contents of the batch file look like this...
>
> cd "o:\rps\rpsfox\cust6.0\pp&l\upload\"
> md5sum H0406000.A00 > H0406000.A00.MD5
>
>The call to that batch program is...
>
> RUN &Md5checkProgram
>
>The batch program does run, but the md5 file doesn't get created. The interesting thing is, that when I double-click the .bat file and run it right from Windows, the md5 file is created, so there's something about the fact that it is run from the Foxpro program that is causing it not to work.
>
>I thought using the .bat file was a convenient way to run the executable with command line parameters (it works great for us when using the winzip command line call). I'm wondering if someone knows how I can get this method to work, or if there is another easy method to call an executable such as md5sum.


If the WSH is available try this:
lcpath = SYS(5) + CURDIR()
SET DEFAULT TO o:\rps\rpsfox\cust6.0\pp&l\upload\
oShell = CREATEOBJECT('WScript.Shell')
oShell.Run('md5sum H0406000.A00 > H0406000.A00.MD5', .T.) & Wait for completion
SET DEFAULT TO (lcpath)
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform