well first of all what argv gives you is implementation-specific. second of all taking "longfoobar.foobar" and shortening it to "longfo~1.foo" does absolutely nothing for you; there is no guaranteed correspondance of any sort between the long file names and their shortened versions. also, what compiler is this? i'm curious because djgpp accepts lfns in system() calls, and obviously any windoze compiler will.
Originally posted by CodeMonkey
Using argv on a console program gives you the full pathname. This is good, but I need it in shortened DOS-style so I can use it in system(). You know, the little '~' and no spaces. Is there a way to do this, or do I need to make my own translator (agh!!)?