This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: How to rename file case-sensitive?
- From: Igor Peshansky <pechtcha at cs dot nyu dot edu>
- To: Ronald Fischer <ronald dot fischer at venyon dot com>
- Cc: cygwin at cygwin dot com
- Date: Mon, 13 Aug 2007 10:41:24 -0400 (EDT)
- Subject: Re: How to rename file case-sensitive?
- References: <387E9FC1619C0849BA8934938037E54F0F5CAF@sv-muc-004.venyon-mail.local>
- Reply-to: cygwin at cygwin dot com
On Mon, 13 Aug 2007, Ronald Fischer wrote:
> Is there an easy way to rename a file foo to Foo?
>
> mv foo Foo
>
> complains that they are the same file. From the FAQ
> I learned that this is due to the limitations of
> Windows which does not distinguish between case
> in file names. The FAQ also says that there is a
> "highly experimental" case-sensitive file system
> available.
>
> Not being prepared yet to live in a highly
> experimental way, I'm curious whether there
> is a simpler solution to the rename problem
> aside from the obvious hack
>
> mv foo bar; mv bar Foo
I use the following (which is essentially a wrapper around the hack):
$ cat /usr/local/bin/mvv
#!/bin/sh
/bin/mv "${1%%/}" "${1%%/}-$$" && mv "${1%%/}-$$" "${2%%/}"
HTH,
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Belief can be manipulated. Only knowledge is dangerous. -- Frank Herbert
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/