Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. runing a console app from a batch file with indefinite params

runing a console app from a batch file with indefinite params

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 9 Offline
    9 Offline
    9ine
    wrote on last edited by
    #1

    How to run a VC console app from a batch file but with variable number of params? file.bat vcConsole.exe %???? > file.bat param1 params2 param3 ... paramN and pass them all at once without %1 %2 %3 ... in batch file?

    9ine

    T 1 Reply Last reply
    0
    • 9 9ine

      How to run a VC console app from a batch file but with variable number of params? file.bat vcConsole.exe %???? > file.bat param1 params2 param3 ... paramN and pass them all at once without %1 %2 %3 ... in batch file?

      9ine

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      use %1- instead... sorry, this was the unix way. use %* to expand all the parameters excluding the %0 (which is the batch file name).b


      TOXCCT >>> GEII power

      [VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups