Mr Larrington wants to copy six and a half thousand .mp3 files onto a fresh shiny new USB stick, while retaining the folder structure, because reasons. I cannot just copy the entire source directory tree directly and then delete the files I do not want, because the fresh shiny new USB stick has insufficient bigliness.
Me: | OK, PC, copy these folders and files from the larger directory tree on that device over there to this fresh shiny new USB stick! |
COPY: | Can't, because the folder you want to copy to does not yet exist*. Soz. |
XCOPY: | I can do that! Oh, wait! Some of the folder and file names have funny characters in them! Do you really expect me to understand "é", "ñ" or that Canadian lot** whose name looks like "HRSTA" but isn't? |
Me: | MP3TAG manages it OK... |
ROBOCOPY: | Stand aside, XCOPY! This is a job for me! Half copy, half something else, all-powerful, bulletproof and psych...ERROR 87 |
Me: | WTAF does THAT mean? |
Teh Internetz: | We don't know LOL. Try another device? Also, ROFL! Would you like to see some pictures of kittens? |
Me: | I don't have another device, clot. And fck off with ur kittens. Now, ROBOCOPY, copy the entire original directory tree from HERE to THERE where, unlike the USB stick, there is room for the whole thing. Can you do that? |
ROBOCOPY: | Yes. Yes, I can do that. (Does that) |
| Four hours later... |
Me: | Right. DEL, pray delete all the files I don't want. |
DEL: | I'll do a lot of 'em, guv, but remember what XCOPY said about shifty FOREIGN characters? |
Me: | $DEITY help me, a racist operating system! POWERSHELL, terminate these files with extreme prejudice! |
POWERSHELL: | I'm sorry Dave. I'm afraid I can't do that. Because you used that UKIPpy dinosaur DIR to generate the list of files to delete, and that big city on the Rhine is called "Köln". Not "K“ln". But I, POWERSHELL, can both get the list you want AND delete the files. Aren't I $theCleverOne!!1! |
Me: | Yes. Yes, you are. Though why you find it necessary to pad out all the file paths with up to $LOTS of trailing spaces is a mystery worthy of Hercule Marple her own good self. |
POWERSHELL: | You do know I can be told to trim those those lines, right? Just type '$file = "F:\Foo\x.txt"' and then 'Get-Content $file | Foreach {$_.TrimEnd()} | Set-Content "F:\Foo\y.txt"' |
Me: | Gee, thanks, POWERSHELL! That's really intuitive! |
POWERSHELL: | It worked though, didn't it? |
Me: | Finally! FINALLY I haz just the files I want to copy to the USB stick, all fuelled and ready for take-off. ROBOCOPY, can you... |
ROBOCOPY: | ERROR 87! |
Me: | Windows! If I do <CONTROL-A> here, and then <CONTROL-V> there, will you copy the files? |
Windows: | Yes. Yes I will. Except for the source files which aren't there any more. |
Me: | What do you mean, "they're not there"? Do you think I deleted them while I was asleep? Try again, why don't you? |
Windows: | Oh, silly me! They were there all the time! Forget me own head next! |
Me: | I notice you only cough up these errors when I'm not actually supervising you, Windows. Have you considered therapy? Because I have... |
What should have taken a couple of hours has taken about twenty-four and counting. There has to be an easier way than this. Doesn't there?
* actually ROBOBOPY's "/NOCOPY" qualifier will create the folders while not copying the files, but I didn't know that at the time