Re: Invalid Switch Executing Dos "DIR /X" Command from BP7



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.
.



Relevant Pages

  • Re: Deploy/Debug/Run VB .Net 2005 WinApp with Form or Formless
    ... It should run formless from the command prompt when the switch is included. ... When I run it at the command prompt I select the exe that click once created followed by the switch - it runs both the form and formless options. ... Dim s As String ...
    (microsoft.public.vsnet.general)
  • Re: Bug or Not? Cmd Prompt/Switching Issue
    ... The programs i listed are just for examples, whenever i switch between any ... programs that command prompt will show, but particularily with mIRC, only ... the command prompt will flash once. ... A bug is a defect in the software code which doesn't allow the ...
    (microsoft.public.windows.vista.general)
  • Re: No explorer in safemode
    ... Click the Cancel button so that you do not reboot in Safe Mode. ... = This switch causes Windows to start in Safe Mode. ... Both switches = Safe Mode with Command Prompt. ... MS-MVP Windows Shell/User ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Filename list into Excel
    ... The Dir command in a command prompt will list your files with a date ... The /on switch exports the data in alphabetical order, ... As long as the /on switch is used, the filenames will be in the same ... > I need to generate a spreadsheet that contains the filename, ...
    (microsoft.public.excel.misc)
  • Re: Best DOS version to put on a 5160 XT?
    ... Maybe instead of a "hardware" theme, ... Did you ever see a program called "Graphics Menu for DOS"? ... Like a simple /P switch on ... a lot of commands to pause the screen output scrolling. ...
    (comp.sys.ibm.pc.classic)