Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to rename a filename in uppercase



2008/1/20, Mike Abdullah <email@hidden>:
>
> On 20 Jan 2008, at 17:36, Simone Tessaro wrote:
>
> > Hi,
> > i've a question. I'm trying to write some code that make a filename in
> > uppercase. i wrote a thing like that:
> > [defaultManager movePath:@"foo.txt" toPath:@"FOO.txt" handler:nil];
>
> What happens if you implement a handler? Any indication of why it
> might be failing?

I did it. and this is the result:
{Error = "Already Exists"; Path = "/Users/username/Desktop/foo.txt"; }

so the problem could be something about the case-sensitiveness.

> >
> >
> > this code doesn't work because cocoa seems to be case-sensitive and
> > this method is useless for my pourpose. So, i need a method like the
> > unix mv, in fact if i use the command mv foo.txt FOO.txt , everything
> > is allright.
> > Someone have a smart idea to do this? Or i need to use two renaming?
> > Like this (a very bad idea):
> > [defaultManager movePath:@"foo.txt" toPath:@"temp.txt" handler:nil];
> > [defaultManager movePath:@"temp.txt" toPath:@"FOO.txt" handler:nil];
>
> Well does this actually work for you if you try it?

Nothing. but i think there's a better solution.. more elegant

Thanks

S.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >How to rename a filename in uppercase (From: "Simone Tessaro" <email@hidden>)
 >Re: How to rename a filename in uppercase (From: Mike Abdullah <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.