RE: neko.FileSystem.rename fails when renaming directorytolower case on windows.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: neko.FileSystem.rename fails when renaming directorytolower case on windows.

Jim Hayes
I didn't test that either, took your word for it.
> mv MixedCaseDir/ mixedcasedir/

Is that on Windows? Now I try it, I realise that mv is not available in
cmd on windows. You using some unix tools / cygwin or something like
that?
I'm a bit confused, that mv command does work as I'd expect it to (eg.
renames directory) on linux so I'm fairly confident it's correct, even
if
"mv: cannot move 'MixedCaseDir' to 'mixedcasedir/MixedCaseDir'"
does look as if it was trying to move MixedCaseDir *into* mixedcasedir ?


However : I can use rename in cmd, and it *does* rename the directory to
lower case (in so far as windows displays it, but this works for my
purpose, which is to lowercase all the directory names on the DVD I'm
burning from a windows machine)

So, I'm now thinking that neko.FilesSystem.rename should be able to do
this.
As I said, it's no problem for me practically speaking, but it could put
new users off to have an "unexpected" result.

As it happens, I'm getting a mac soon ;)


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

M:\>d:

D:\>mkdir testRename

D:\>cd testRename

D:\testRename>mkdir TEsT

D:\testRename>dir
 Volume in drive D is New Volume
 Volume Serial Number is 0E77-FCC3

 Directory of D:\testRename

30/01/2009  22:33    <DIR>          .
30/01/2009  22:33    <DIR>          ..
30/01/2009  22:33    <DIR>          TEsT
               0 File(s)              0 bytes
               3 Dir(s)  163,399,774,208 bytes free

D:\testRename>rename TEsT test

D:\testRename>dir
 Volume in drive D is New Volume
 Volume Serial Number is 0E77-FCC3

 Directory of D:\testRename

30/01/2009  22:33    <DIR>          .
30/01/2009  22:33    <DIR>          ..
30/01/2009  22:33    <DIR>          test
               0 File(s)              0 bytes
               3 Dir(s)  163,399,774,208 bytes free

D:\testRename>


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jim Hayes
Sent: 30 January 2009 16:12
To: The haXe compiler list
Subject: RE: [haXe] neko.FileSystem.rename fails when renaming
directorytolower case on windows.

> mv MixedCaseDir/ mixedcasedir/
I didn't even think to try that! :(
It's just windows behaviour then I would think, apologies for the noise.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Ian Martins
Sent: 30 January 2009 16:04
To: The haXe compiler list
Subject: Re: [haXe] neko.FileSystem.rename fails when renaming directory
tolower case on windows.

Jim Hayes wrote:
>
> Apologies if this would be better placed in a neko mailing list(?).
>
> Anyway,
>
> neko.FileSystem.rename
> ("C:\MixedCaseDirectory","C:\mixedcasedirectory") fails on windows XP.
>
> I'm not sure if it's actually a bug or just an unavoidable consequence

> of window's awful case handling of filenames.
>
> I have an easy workaround of renaming to a different name and then
> renaming back again (but lowercased) so I'm good to go for what I need

> to do,
>
> Just thought I'd report it to you in case it's unintentional, Nicolas.
>
maybe that's because xp recognizes that 'mixedcasedirectory' is a
fallacy. :)

I've noticed that this doesn't work from a command prompt either.

mv MixedCaseDir/ mixedcasedir/

results in

mv: cannot move 'MixedCaseDir' to 'mixedcasedir/MixedCaseDir'

guess that makes sense in a windows kinda way.



--

haXe - an open source web programming language
http://haxe.org

______________________________________________________________________
This communication is from Primal Pictures Ltd., a company registered in
England and Wales with registration No. 02622298 and registered office:
4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W
5PA, UK. VAT registration No. 648874577.


This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received it
in error, please contact the sender immediately by return e-mail or by
telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not
disclose its contents to any person.
This email has been scanned for Primal Pictures by the MessageLabs Email
Security System.
______________________________________________________________________

--

haXe - an open source web programming language
http://haxe.org

______________________________________________________________________
This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person.
This email has been scanned for Primal Pictures by the MessageLabs Email Security System.
______________________________________________________________________

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: neko.FileSystem.rename fails when renaming directorytolower case on windows.

Ian Martins
you're right I did install something that changed my windows command
line tools.  it wasn't cygwin.  I don't remember what it was.

In the code, it appears that neko is just calling "rename" from stdio.h.

Jim Hayes wrote:

> I didn't test that either, took your word for it.
>  
>> mv MixedCaseDir/ mixedcasedir/
>>    
>
> Is that on Windows? Now I try it, I realise that mv is not available in
> cmd on windows. You using some unix tools / cygwin or something like
> that?
> I'm a bit confused, that mv command does work as I'd expect it to (eg.
> renames directory) on linux so I'm fairly confident it's correct, even
> if
> "mv: cannot move 'MixedCaseDir' to 'mixedcasedir/MixedCaseDir'"
> does look as if it was trying to move MixedCaseDir *into* mixedcasedir ?
>
>
> However : I can use rename in cmd, and it *does* rename the directory to
> lower case (in so far as windows displays it, but this works for my
> purpose, which is to lowercase all the directory names on the DVD I'm
> burning from a windows machine)
>
> So, I'm now thinking that neko.FilesSystem.rename should be able to do
> this.
> As I said, it's no problem for me practically speaking, but it could put
> new users off to have an "unexpected" result.
>
> As it happens, I'm getting a mac soon ;)
>
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> M:\>d:
>
> D:\>mkdir testRename
>
> D:\>cd testRename
>
> D:\testRename>mkdir TEsT
>
> D:\testRename>dir
>  Volume in drive D is New Volume
>  Volume Serial Number is 0E77-FCC3
>
>  Directory of D:\testRename
>
> 30/01/2009  22:33    <DIR>          .
> 30/01/2009  22:33    <DIR>          ..
> 30/01/2009  22:33    <DIR>          TEsT
>                0 File(s)              0 bytes
>                3 Dir(s)  163,399,774,208 bytes free
>
> D:\testRename>rename TEsT test
>
> D:\testRename>dir
>  Volume in drive D is New Volume
>  Volume Serial Number is 0E77-FCC3
>
>  Directory of D:\testRename
>
> 30/01/2009  22:33    <DIR>          .
> 30/01/2009  22:33    <DIR>          ..
> 30/01/2009  22:33    <DIR>          test
>                0 File(s)              0 bytes
>                3 Dir(s)  163,399,774,208 bytes free
>
> D:\testRename>
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Jim Hayes
> Sent: 30 January 2009 16:12
> To: The haXe compiler list
> Subject: RE: [haXe] neko.FileSystem.rename fails when renaming
> directorytolower case on windows.
>
>  
>> mv MixedCaseDir/ mixedcasedir/
>>    
> I didn't even think to try that! :(
> It's just windows behaviour then I would think, apologies for the noise.
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Ian Martins
> Sent: 30 January 2009 16:04
> To: The haXe compiler list
> Subject: Re: [haXe] neko.FileSystem.rename fails when renaming directory
> tolower case on windows.
>
> Jim Hayes wrote:
>  
>> Apologies if this would be better placed in a neko mailing list(?).
>>
>> Anyway,
>>
>> neko.FileSystem.rename
>> ("C:\MixedCaseDirectory","C:\mixedcasedirectory") fails on windows XP.
>>
>> I'm not sure if it's actually a bug or just an unavoidable consequence
>>    
>
>  
>> of window's awful case handling of filenames.
>>
>> I have an easy workaround of renaming to a different name and then
>> renaming back again (but lowercased) so I'm good to go for what I need
>>    
>
>  
>> to do,
>>
>> Just thought I'd report it to you in case it's unintentional, Nicolas.
>>
>>    
> maybe that's because xp recognizes that 'mixedcasedirectory' is a
> fallacy. :)
>
> I've noticed that this doesn't work from a command prompt either.
>
> mv MixedCaseDir/ mixedcasedir/
>
> results in
>
> mv: cannot move 'MixedCaseDir' to 'mixedcasedir/MixedCaseDir'
>
> guess that makes sense in a windows kinda way.
>
>
>
>  




--
haXe - an open source web programming language
http://haxe.org