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-Thread: 103376,f2991708fd57254c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!b28g2000cwb.googlegroups.com!not-for-mail From: "Martin" Newsgroups: comp.lang.ada Subject: Re: programming question . . . Date: 17 Sep 2006 16:12:01 -0700 Organization: http://groups.google.com Message-ID: <1158534721.332630.309140@b28g2000cwb.googlegroups.com> References: <1158526988.287711.242070@m73g2000cwd.googlegroups.com> NNTP-Posting-Host: 194.72.9.18 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1158534725 8551 127.0.0.1 (17 Sep 2006 23:12:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 17 Sep 2006 23:12:05 +0000 (UTC) In-Reply-To: <1158526988.287711.242070@m73g2000cwd.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: b28g2000cwb.googlegroups.com; posting-host=194.72.9.18; posting-account=XiyOPQwAAAAWaVcCa4QxXp0-x5e4JDUD Xref: g2news2.google.com comp.lang.ada:6626 Date: 2006-09-17T16:12:01-07:00 List-Id: What compiler/OS are you using? If you are using GNAT GPL "2005" or "2006" then it comes with Ada.Directories which will help. For other compilers, try http://www.martin.dowie.btinternet.co.uk/ and download a version of Ada.Directories from there. There is a "rename" procedure in this package. You could look at using Ada.Strings.Maps for working out the new name but it's probably overkill. Just loop over the range of the String object and check/replace as required. Cheers -- Martin lakeoftea wrote: > I'm trying to write a program that will look at a directory and take > the "_"'s out of all of the files and replace them with spaces. this > seems like an easy program but i haven't used ada since freshman year > and i'm kind of stumped. any ideas. no this is not for an assignment > :) > > thanks!