Space in directory line

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lumpybanana247
    New Member
    • Apr 2007
    • 134

    Space in directory line

    #include <stdlib.h>
    #include <windows.h>
    int main()
    {
    system("start C:\\Program Files\\TikiConv erter.exe");
    }


    this wont work because Program Files is two words. Do you know what i could do to run this, this says C:\Program does not exist.

    thanks
  • scruggsy
    New Member
    • Mar 2007
    • 147

    #2
    Try:
    Code:
    system("start C:\\Progra~1\\TikiConverter.exe");
    I'm sure there's a better way, though.

    Comment

    • gpraghuram
      Recognized Expert Top Contributor
      • Mar 2007
      • 1275

      #3
      HI,
      Sinc there is a space in the path you have to use extra quotes like this

      system("start \"C:\\Program Files\\TikiConv erter.exe\"");
      Better check the slash before the quotes

      Thanks
      Raghuram

      Comment

      • lumpybanana247
        New Member
        • Apr 2007
        • 134

        #4
        the second one didnt work, but the first one did, thanks

        Comment

        Working...