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 12:34:10 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Using Spawn in Win2K Date: Tue, 7 May 2002 14:34:21 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <6QTB8.4153$iB4.10546@nntpserver.swip.net> X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:23669 Date: 2002-05-07T14:34:21-05:00 List-Id: 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. 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. 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.) -- Compiler-specific: Gnat.Directories: Gnat-specific. Works (supposedly) on any Gnat supported OS. Every other Ada compiler has such a library as well. You also could use Florist or other of the other OS-interface packages. Any of these choices would be less platform-specific than using Spawn. Randy Brukardt.