Thread: C system call and msdos batch files.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794

    C system call and msdos batch files.

    I had a batch file which had the folowing line in, which ran fine, basically it produced a list of .log files.
    Code:
    dir c:\"Program Files"\"William Hill Poker"\log\XP02202685\2009011318505875\*.log /b /s >>dirs.doc

    However when I tried to run it from a C program using the system command eg:
    Code:
    system("mycreatelogfilelist.bat");
    It does not work, it comes back with, I think "Too many parameters".
    I think this is due to MSDOS really more than a 'C' thing but does anyone know
    how I could have got it to work? It is I think something to do with the way it parses
    the line being different when it is called from C but I don't know how to get around it.
    Last edited by esbo; 01-15-2009 at 12:28 AM.

Popular pages Recent additions subscribe to a feed