Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MikePancho

macrumors newbie
Original poster
Dec 20, 2012
4
0
I am having lots of trouble moving files to another folder with a .command file. I need to move:

~/Desktop/"AnimatedMC + HoeCraft"/"Resources"/"AnimatedMC + HoeCraft 1.5.2" to ~/Library/Application Support/minecraft/texturepacks

~/Desktop/AnimatedMC + HoeCraft/Resources/"AnimatedMC + HoeCraft 1.6.2" to ~/Library/Application Support/minecraft/recourcepacks

~/Desktop/AnimatedMC + HoeCraft/Resources/"en_US.lang" to ~/Library/Application Support/minecraft/bin/minecraft.jar

How would I do that?

Thank You,
Mike:eek:
 
Post the .command file you tried that didn't work. Also post the exact error message.

Spaces embedded in filenames must be quoted. Apply that rule to the destination filename of your first example.

If something isn't working, we need to see the exact command-line, and the error message you got.
 
There wasn't an error message, Terminal just opened then closed real fast and the files weren't moved. You can't attach a .command file so here is the code and download link:
Code
Download
 
There wasn't an error message, Terminal just opened then closed real fast and the files weren't moved. You can't attach a .command file so here is the code and download link:
Code
Download

Perhaps you need to escape the spaces. Try using \ before each space character. And lose the quotation marks.

Code:
mv ~/Desktop/AnimatedMC\ +\ HoeCraft/Resources/AnimatedMC\ +\ HoeCraft\ 1.5.2   ~/Library/Application\ Support/minecraft/texturepacks

(And why do you need to do this with Terminal?)
 
Last edited:
Perhaps you need to escape the spaces. Try using \ before each space character. And lose the quotation marks.

Code:
mv ~/Desktop/AnimatedMC\ +\ HoeCraft/Resources/AnimatedMC\ +\ HoeCraft\ 1.5.2   ~/Library/Application\ Support/minecraft/texturepacks

(And why do you need to do this with Terminal?)
The simple answer: Terminal expects the space character to be a command/argument separator.

The long, complex answer: The problem isn't strictly Terminal.app's fault. It's caused by the command shell running inside of it (bash, tcsh, zsh, etc.) interpreting the spaces in your path as separators when this isn't intended. This causes the shell to think that "~/Desktop/AnimatedMC", "+", "HoeCraft/Resources/AnimatedMC", etc. are separate arguments to the mv command, which obviously causes it to fail with a file not found error.
 
The simple answer: Terminal expects the space character to be a command/argument separator.

The long, complex answer: The problem isn't strictly Terminal.app's fault. It's caused by the command shell running inside of it (bash, tcsh, zsh, etc.) interpreting the spaces in your path as separators when this isn't intended. This causes the shell to think that "~/Desktop/AnimatedMC", "+", "HoeCraft/Resources/AnimatedMC", etc. are separate arguments to the mv command, which obviously causes it to fail with a file not found error.

I know this!

I meant "OP, why are you moving the files with Terminal?"

But you've taught someone something!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.