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,2d7ec12dd7db366 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-27 19:16:24 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!out.nntp.be!propagator-SanJose!news-in-sanjose!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.sttln1.wa.home.com.POSTED!not-for-mail From: "DuckE" Newsgroups: comp.lang.ada References: Subject: Re: How to rename a file? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Fri, 28 Sep 2001 02:16:24 GMT NNTP-Posting-Host: 24.248.45.203 X-Complaints-To: abuse@home.net X-Trace: news1.sttln1.wa.home.com 1001643384 24.248.45.203 (Thu, 27 Sep 2001 19:16:24 PDT) NNTP-Posting-Date: Thu, 27 Sep 2001 19:16:24 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:13451 Date: 2001-09-28T02:16:24+00:00 List-Id: Here's how I make the OS call on WindowsNT/W2K using ObjectAda or GNAT: WITH Win32; WITH Win32.WinBase; WITH Interfaces.C; ... PACKAGE WinBase RENAMES Win32.WinBase; PACKAGE C RENAMES Interfaces.C; USE TYPE Win32.BOOL; USE TYPE Win32.DWORD; ... PROCEDURE RenameFileDFU( sourceFileNameDFU, destFileNameDFU : STRING; renamedDFU : out BOOLEAN ) IS result : Win32.BOOL; sourceName : ALIASED C.Char_Array := C.To_C( sourceFileNameDFU ); destName : ALIASED C.Char_Array := C.To_C( destFileNameDFU ); BEGIN result := WinBase.MoveFile( sourceName(0)'UNCHECKED_ACCESS, destName(0)'UNCHECKED_ACCESS ); renamedDFU := result /= Win32.FALSE; END RenameFileDFU; I hope this helps, SteveD "Pi" wrote in message news:MYKs7.11405$%r.2963162@news20.bellglobal.com... > It may sound stupid, but I didn't find anything. > > Is there a way to rename files in Ada? > > Other than : > create a new file, > copy every byte into the new one, > delete the old one. > > -- > 3,14159265359 >