Re: Invalid Switch Executing Dos "DIR /X" Command from BP7
- From: Dr John Stockton <jrs@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 15 May 2006 21:10:43 +0100
JRS: In article <0t1ag.17044$Lm5.5398@xxxxxxxxxxxxxxxxxxxxxxxxxx>,
dated Mon, 15 May 2006 15:52:28 remote, seen in
news:comp.lang.pascal.borland, Jim Bishop <bishopjp@xxxxxxxxxx> posted :
I'm getting the following error:
Borland Pascal Version 7.0 Copyright (c) 1983,92 Borland International
Invalid switch - /X
when I run the following short program compiled in Real Mode with no
conditionals defined. From a command prompt the "DIR /X >TEST.TXT"
works fine. Any pointers would be appreciated. I'm trying to map long
directory/file names to short directory/file names.
As a side note, when I comment out the SetMemTop lines in FreePascal, it
runs fine; so I don't think it's the command itself.
It must be the command itself, or that which provides it, because
nothing else known that the /X in the string 'DIR /X >TEMP.TXT'
is in fact a switch.
Try it (at command prompt and in your program) with a "switch" that has
no known existence, such as /5 or /#, and with one that has "always"
existed, such as /W.
I suspect that the "DOS" at your command prompt (boot into a DOS-like
mode? MS-DOS prompt window?) is not actually the same as the "DOS" which
BP7 invokes. See what string GetEnv('comspec') actually returns -
it *may* be a surprise.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
<URL:http://www.merlyn.demon.co.uk/clpb-faq.txt> RAH Prins : c.l.p.b mFAQ;
<URL:ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ.
.
- References:
- Invalid Switch Executing Dos "DIR /X" Command from BP7
- From: Jim Bishop
- Invalid Switch Executing Dos "DIR /X" Command from BP7
- Prev by Date: Re: Invalid Switch Executing Dos "DIR /X" Command from BP7
- Next by Date: Re: Invalid Switch Executing Dos "DIR /X" Command from BP7
- Previous by thread: Re: Invalid Switch Executing Dos "DIR /X" Command from BP7
- Next by thread: Re: Invalid Switch Executing Dos "DIR /X" Command from BP7
- Index(es):
Relevant Pages
|