Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 27, 2007, 01:48 PM   #1
SHankara
macrumors member
 
Join Date: Oct 2007
trouble changing a folder name in terminal

im trying to rename a folder with the "mv" command but its not working

heres what I do

mv カトロ .カトロ

but it just goes to the resulting mv command options,is it becuase of the japanese characters,or becuase the folder is on a diff volume?
SHankara is offline   0 Reply With Quote
Old Nov 27, 2007, 01:56 PM   #2
SHankara
Thread Starter
macrumors member
 
Join Date: Oct 2007
or should i try a diff shell?
SHankara is offline   0 Reply With Quote
Old Nov 27, 2007, 01:58 PM   #3
Cromulent
macrumors 603
 
Cromulent's Avatar
 
Join Date: Oct 2006
Location: The Land of Hope and Glory
Type mv *original name* *new name*.

Basically you just move the original to a new name if that makes sense. Unix type system work slightly differently.

Edit : bah didn't read the thread...

As far as I am aware you shouldn't have any problems with that as long as you are moving the folder within the same directory.
__________________
Neural Advance - Mac OS X, UNIX and Windows Development
Last.fm Profile | Extreme Metal Reviews
MP 4x 2.66Ghz Xeons / 6GB RAM / 640GB + 500GB + 750GB + 1TB HDDs / ATI Radeon 4870 / iPad 3
Cromulent is offline   0 Reply With Quote
Old Nov 27, 2007, 02:29 PM   #4
Big Dave
macrumors 6502
 
Join Date: Nov 2007
Location: Crestview, Fl
Special character in the new file name

In Unix, . is a special character usually equating to the current directory. IE moving something from /some/path to . (current location). Try escaping before the . meaning mv file \.file or mv file "file"
Big Dave is offline   0 Reply With Quote
Old Nov 27, 2007, 03:05 PM   #5
itickings
macrumors 6502a
 
itickings's Avatar
 
Join Date: Apr 2007
Quote:
Originally Posted by SHankara View Post
im trying to rename a folder with the "mv" command but its not working

heres what I do

mv カトロ .カトロ

but it just goes to the resulting mv command options,is it becuase of the japanese characters,or becuase the folder is on a diff volume?
Try quoting the names instead. Obviously I have no idea what you are trying to rename to what, but if it is カトロ to .カトロ, try this:

Code:
mv "カトロ" ".カトロ"
Edit: If you copied your exact command line when you posted, the problem is that the " " is a blank character which is not a space " ". mv then sees only one parameter because of this, not two.

Last edited by itickings; Nov 27, 2007 at 03:14 PM.
itickings is offline   0 Reply With Quote
Old Nov 27, 2007, 03:08 PM   #6
Peace
macrumors P6
 
Peace's Avatar
 
Join Date: Apr 2005
Location: Space--The ONLY Frontier
Pardon my ignorance but wouldn't it be easier to just click on the folder and change the name ?

This is under the assumption you're doing this from the same computer of course.
Peace is offline   0 Reply With Quote
Old Nov 27, 2007, 07:44 PM   #7
ChrisA
macrumors G4
 
Join Date: Jan 2006
Location: Redondo Beach, California
Quote:
Originally Posted by Peace View Post
Pardon my ignorance but wouldn't it be easier to just click on the folder and change the name ?
No. It is quicker to type"mv a b" than to click the finder icon, wait for it to start then drill down to the folder and click the name and change it. Got a stopwatch? Try it both ways.
ChrisA is offline   0 Reply With Quote
Old Nov 27, 2007, 08:49 PM   #8
SHankara
Thread Starter
macrumors member
 
Join Date: Oct 2007
Quote:
Originally Posted by itickings View Post
Try quoting the names instead. Obviously I have no idea what you are trying to rename to what, but if it is カトロ to .カトロ, try this:

Code:
mv "カトロ" ".カトロ"
Edit: If you copied your exact command line when you posted, the problem is that the " " is a blank character which is not a space " ". mv then sees only one parameter because of this, not two.
Thanks it worked,but can you explain why this worked for the japanese characters?regular roman text doesnt need the quotes
SHankara is offline   0 Reply With Quote
Old Nov 27, 2007, 08:52 PM   #9
SHankara
Thread Starter
macrumors member
 
Join Date: Oct 2007
WOW strange I dont know if its bug,but I jsut renamed without the qoutes.something to do with spacing of roman and japanese characters!

thanks for your guys help!
SHankara is offline   0 Reply With Quote
Old Nov 28, 2007, 03:24 PM   #10
itickings
macrumors 6502a
 
itickings's Avatar
 
Join Date: Apr 2007
Quote:
Originally Posted by SHankara View Post
WOW strange I dont know if its bug,but I jsut renamed without the qoutes.something to do with spacing of roman and japanese characters!

thanks for your guys help!
It was all the spacing as I pointed out in my edit.

Quotes are often good to use though, they can help avoid disasters. The Terminal is very powerful, it can help you do your work fast, or help you screw up your system even faster
itickings is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Changing Dock Icon Trouble trewyn15 PowerPC Macs 12 Jan 25, 2014 10:14 AM
Open all files from folder via Terminal vloryan Mac Programming 11 Jan 12, 2014 06:55 PM
Overwritten(???) hidden folder Terminal. Help. DCWolfie OS X Mavericks (10.9) 5 Nov 15, 2013 04:59 PM
Changing secondary monitor background image in Terminal jsimons Mac Programming 1 Aug 1, 2013 07:22 PM
Having trouble with Spotflux, an IP address changing program piatti Mac Applications and Mac App Store 2 Mar 4, 2013 10:33 AM

Forum Jump

All times are GMT -5. The time now is 06:26 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC