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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,575c148e80bbbdf8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-06 14:06:43 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news2.wam.umd.edu!cadig2.usna.navy.mil!info.usuhs.mil!oanews!not-for-mail From: "Dave Head" Newsgroups: comp.lang.ada Subject: Re: Using Spawn in Win2K Date: Mon, 6 May 2002 17:05:03 -0400 Organization: NSWCDD Message-ID: References: NNTP-Posting-Host: oanews X-Trace: oanews 1020719172 4855 (6 May 2002 21:06:12 GMT) X-Complaints-To: abuse@nswc.navy.mil NNTP-Posting-Date: 6 May 2002 21:06:12 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:23600 Date: 2002-05-06T21:06:12+00:00 List-Id: Further info... I _found_ command.com under c:\winnt\system32. Why wasn't it found in the search starting at c:\? I dunno - prolly misspelt it. But, I put the whole path into the spawn for the command. Same result. So, not only don't I know how to get it working, I've got nary a clue as to why it doesn't. Please help. Dave Head "Dave Head" wrote in message news:ab6q0l$4g6$1@oanews.nswc.navy.mil... > 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 > >