trouble changing a folder name in terminal

Discussion in 'Mac Programming' started by SHankara, Nov 27, 2007.

  1. macrumors member

    Joined:
    Oct 5, 2007
    #1
    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?
     
  2. thread starter macrumors member

    Joined:
    Oct 5, 2007
    #2
    or should i try a diff shell?
     
  3. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #3
    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.
     
  4. macrumors 6502

    Joined:
    Nov 27, 2007
    Location:
    Crestview, Fl
    #4
    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"
     
  5. macrumors 6502a

    itickings

    Joined:
    Apr 14, 2007
    #5
    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.
     
  6. macrumors P6

    Peace

    Joined:
    Apr 1, 2005
    Location:
    Space--The ONLY Frontier
    #6
    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.:)
     
  7. macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #7
    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.
     
  8. thread starter macrumors member

    Joined:
    Oct 5, 2007
    #8
    Thanks it worked,but can you explain why this worked for the japanese characters?regular roman text doesnt need the quotes
     
  9. thread starter macrumors member

    Joined:
    Oct 5, 2007
    #9
    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!
     
  10. macrumors 6502a

    itickings

    Joined:
    Apr 14, 2007
    #10
    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 :p
     

Share This Page