Horrific Default Behavior
Today I wrote a batch file called clean.bat and put it in a directory on a different machine. It contained -
del /f /s /q *.obj
del /f /s /q *.ilk
del /f /s /q *.pdb
I had the directory up with Windows Explorer and '\\machine_name\c$\dev\..' was in the address bar. I saved the file into the directory of the other machine. Pretty straightforward, right?
So, thoughtlessly, I double click on clean.bat. Without ado, the batch file starts executing with this message -
CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
C:\WINDOWS>del /f /s /q *.obj
Holy crap! Fortunately, I saw it immediately and broke out of it. Even more fortunate, I don't think C:\WINDOWS has any .obj files.
But, if I had wanted to clean .exe files instead (which I frequently do), my machine would have been utterly hosed.
That, my friends, is horrific default behavior.
Last year, our water heater died. It was pretty old, I think. The problem was the way that it died - by catching fire. That was pretty disturbing.
So the next day, while I was at work, the repairman came out to replace it. Rebekka asked him why it caught fire. The repairman explained, "that's how you know it's broken."Really? The next time my water heater fails, I'll know by following the fire trucks home to see my subdivision in cinders. "Time for a new water heater," I'll say to myself.
And how will I know when my nail clippers need replacing? Oh that's right, from the mushroom cloud over Orlando.