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,c425816b20dec2e2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-16 18:48:17 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3F16004D.7000902@spam.com> From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada Procedures Required for GNAT 3.10p (for DOS) Port References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 17 Jul 2003 01:45:42 GMT NNTP-Posting-Host: 63.184.32.249 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1058406342 63.184.32.249 (Wed, 16 Jul 2003 18:45:42 PDT) NNTP-Posting-Date: Wed, 16 Jul 2003 18:45:42 PDT Xref: archiver1.google.com comp.lang.ada:40375 Date: 2003-07-17T01:45:42+00:00 List-Id: Debs Wisbey wrote: > > I am trying to port an old bit of code from the Alsys Compiler to GNAT > 3.01p for DOS and have come across a few problems. Unfortunately, my > Ada knowledge is not a string as I would like or require and so have a > limited knowledge of the available packages. I don't think it is a good idea for your Ada knowledge to be a string :) > I am trying to write an Ada procedure that can call DOS commands from > an Ada program that is running on a 386 machine that ONLY runs DOS. > > I am trying to write an Ada procedure that can rename a file, given > the old filename and new filename as strings. I don't recall 3.10 very well. Does GNAT.OS_Lib exist for that release? If so, Spawn will do these kinds of things for you. You use the program "command" and give it the arguments "/c desired-command arguments". For example, for renaming a file, you would pass the arguments "/c ren " & Old_Name & ' ' & New_Name -- Jeff Carter "You tiny-brained wipers of other people's bottoms!" Monty Python & the Holy Grail