Pb avec System()

salley Messages postés 34 Date d'inscription lundi 5 mai 2003 Statut Membre Dernière intervention 19 septembre 2007 - 28 mai 2003 à 23:07
roswell117 Messages postés 61 Date d'inscription jeudi 31 janvier 2002 Statut Membre Dernière intervention 18 novembre 2005 - 30 mai 2003 à 10:23
Voila j'aimerais executer dans mon code les commandes suivant sous MS-DOS:

cd..
cd..
cd th\scheduler\Debug
scheduler reportfinal.txt


scheduler etant un executable et reportfinal.txt le fichier que doit traiter scheduler.

Dans mon code je tape cela :
system("cd..");
   system("cd..");
   system("cd..");
   system("cd..");

   system("cd C:\\Thibault\\Scheduler\\Debug");
   system("scheduler reportfinal.txt");


Quand je tape ces commandes manuellement sous MS-DOS, cela marche ss probleme mais quand je les execute dand mon code ca ne marche pas et voila ce que cela m'affiche dans la fenetre DOS:
'scheduler' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue


Je ne sais pas quoi faire, vous avez des idees? (je dois rendre mon projet final pour dans 1 ou 2 jour!!!)

Merci

1 réponse

roswell117 Messages postés 61 Date d'inscription jeudi 31 janvier 2002 Statut Membre Dernière intervention 18 novembre 2005
30 mai 2003 à 10:23
et en faisant directement

system("cd C:\\Thibault\\Scheduler\\Debug\\scheduler reportfinal.txt");

ca marche ou pas ??

sinon essaye ca :

ShellExecute(NULL, "open", "C:\\Thibault\\Scheduler\\Debug\\scheduler", "reportfinal.txt", 0, SW_NORMAL);
0
Rejoignez-nous