From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,575c148e80bbbdf8,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-06 13:45:46 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!news2.wam.umd.edu!cadig2.usna.navy.mil!info.usuhs.mil!oanews!not-for-mail From: "Dave Head" Newsgroups: comp.lang.ada Subject: Using Spawn in Win2K Date: Mon, 6 May 2002 16:44:01 -0400 Organization: NSWCDD Message-ID: NNTP-Posting-Host: oanews X-Trace: oanews 1020717909 4614 (6 May 2002 20:45:09 GMT) X-Complaints-To: abuse@nswc.navy.mil NNTP-Posting-Date: 6 May 2002 20:45:09 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:23599 Date: 2002-05-06T20:45:09+00:00 List-Id: Hello, I have been trying to use spawn just to get it to give me a directory. Someday, if I ever get a directory, I might like to pipe it to a file. But, first things first. I've been wasting an incredible amount of time tripping thru about 10 years of google newsgroup posts viewing people asking about spawn with as many years of creative ways of not anwering the question. What I'm looking for is a specific example. Here's what I have so far: with GNAT.OS_Lib; procedure test_OSLib is Success : BOOLEAN; Cmd : String := "Dir"; Cmd_ptr : GNAT.OS_Lib.String_Access; Cmd_array : GNAT.OS_Lib.Argument_List(1..1); begin Cmd_ptr := new String'(Cmd); Cmd_array(1) := Cmd_ptr; GNAT.OS_Lib.Spawn ("Command.Com", Cmd_array, Success); end test_OSLib; ...And this is the response: Specified COMMAND search directory bad Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-1999. Howcum? Because, as far as a search of the C: drive can tell, there is no "command.com" on the disk. Again, this is W2K. So, please, what goes where I have "command.com"? Or, can it be done at all in W2K? Later, when that is working, and I want to say "dir >filename.txt" to throw the output into a file, can the entire phrase "dir >XXX.XXX" be thrown into the string, or do each of "dir", ">" and "XXX" have to be a different string for the Cmd_array to point to? Thanks in advance, Dave Head