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-07 13:03:31 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!info.usuhs.mil!oanews!not-for-mail From: "Dave Head" Newsgroups: comp.lang.ada Subject: Re: Using Spawn in Win2K Date: Tue, 7 May 2002 16:02:16 -0400 Organization: NSWCDD Message-ID: References: <6QTB8.4153$iB4.10546@nntpserver.swip.net> NNTP-Posting-Host: oanews X-Trace: oanews 1020801806 24257 (7 May 2002 20:03:26 GMT) X-Complaints-To: abuse@nswc.navy.mil NNTP-Posting-Date: 7 May 2002 20:03:26 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:23673 Date: 2002-05-07T20:03:26+00:00 List-Id: "Randy Brukardt" wrote in message news:udgb1hnacmmh49@corp.supernews.com... > Dave Head wrote in message ... > >Thanks. > > > >I did find CMD. But this is going to make it more fun to produce > something > >for people with the different OS's and have it work the same... > command.com > >wants to give 8X3 filenames no matter what. CMD does long filenames, > no > >problem, and by default too. > > > >It must be quitting time somewhere in the world... > > Trying to use "spawn" to get a list of files seems like killing a flea > with a cannon. I've been known to do that... I buy cars with big engines, too... And, as you've found out, its not in the least portable > (even to different versions of windows). There are lots of good uses for > Spawn (or 'Prog_Call' as it is called in Janus/Ada, ...), but this isn't > one of them. OK. > If you need to find a list of information about files in a directory, > you are best off using a package designed for the purpose. The first > choice would be Ada.Directories, but it probably will be a few years > before that is generally available. But there are a lot of other choices > available: > -- Claw.Directories: Windows-specific. Works on any Ada compiler for > Windows. (But it is tied into Claw, so if you're using a different GUI, > or no GUI, it may be a bad choice.) Isn't that tied to $$$. And, no gui - its too simple - a GUI would be overkill. > -- Compiler-specific: > Gnat.Directories: Gnat-specific. Works (supposedly) on any Gnat > supported OS. Every other Ada compiler has such a library as well. Found G-direop.ads .. adb. OK, but it appears as if one needs to 1) Open the directory (how to open the current directory? Research here - I'm just getting started with this. Prolly Get_Current_Dir. Yeah - duh...) 2) Use procedure Read in a loop until it finds the end, while 3) Storing each file name into the dos file I wanted. 4) Close the file That is slightly more complicated. I'll probably do it for the portability. Thanks for the info. I guess I didn't read g-direop.ads closely enough to notice you could do that. Of course, I approached it _wanting_ to do "dir/b >XXX.XXX" which seemed awful simple at the time. > You also could use Florist or other of the other OS-interface packages. Web search in order - just getting started with gnat/dos/windows and haven't heard of these yet. > Any of these choices would be less platform-specific than using Spawn. Oh, yeah... I'll likely stick with the gnat stuff, tho Thanks again, Dave Head > > Randy Brukardt.