Tuesday, July 22, 2008

The windows copying commands suck giant spicy boner

I really love using windows. Its almost as pleasant as having your balls severed, liquefied in acid then pumped intravenously back into your body. Trying to use the terminal is fucking great! Its only marginally less pleasant than having feral cats surgically implanted into your scrotum. The copying commands in said terminal are brilliant! Using them is not quite as pleasant as having flaming gerbils stuffed into your anus by a cult of psychotic homosexual rapists.

The other day I was hacking on the fucking NERD tree trying to implement copying tree nodes (i.e. files/directories) in windows. Vimscript doesn't provide a function to copy files/directories so you have to shell out to do it. This is fine on *nix and osx where you can be sure legions of sweaty computer nerds are, even as we speak, busting out the TLC to improve the terminals/terminal apps. The same cannot be said for the windows terminal. This goes a long way toward explaining why its copying commands suck the spicy rod of beelzebub.

When I was writing the copying code, I was wanting to shell out to a single command for each OS that required no user input.

This is the copying command the NERD tree uses for *nix/osx

cp -r source destination

Clearly this needs to be much more complex and difficult. Good thing we have windows. Lets take a look at the windows copying commands!

The first one I looked at was copy.

copy source destination

This is ok for files, but when source is a directory it (most logically) copies the entire contents of that directory into a single file. That's understandable. The programmer who wrote the command was handicapped. I get it.

The second command I looked at was xcopy.

xcopy /E source destination

This is almost good. Apart from the fact that the program is so abysmally fucking stupid that it has to ask you if destination should be a directory or a file. Could the programmer who wrote xcopy possibly be any more retarded? Let me put it like this: If a scientist was cloning a sheep for me and asked me whether said clone should be a sheep or a cow, I would take out my gun and strengthen the human gene pool by blowing his dumb ass out of it. Fuck you xcopy, you fail.

Next on the list of candidate commands was something called robocopy. Thankfully that wasn't even present on my install. Come on! "robocopy"!?! wtf, how many attempts does it take to make a program to copy stuff!?

I am aware that the windows terminal and all its shitty copying commands probably suck because they are complying to some standard or pseudo standard for backwards compatibility. I don't care, I'm still gonna hate on them, because they still suck sweaty ballsack.

1 comment:

  1. Use the /I/Y option

    xcopy /E/Y/I dir1 dir2

    xcopy /E/Y/I file1 file2