Urgent.News

What's breaking now, across thousands of outlets.

Tech

Batch file automated a clean-up job, then fouled itself by deleting the wrong directory

It survived testing and the boss signed off, so who was really to blame?

Batch file automated a clean-up job, then fouled itself by deleting the wrong directory

Pascal, an IT professional, had a frustrating experience with a batch file that inadvertently caused significant damage to an Exchange server. The server, newly acquired by his company, housed around 600 mailboxes and was managed by the IT department. In an effort to maintain the Information Store's performance, Pascal decided to write a script that would stop the service, compact the database, delete temporary files, and then restart the service.

The script executed successfully, demonstrating its effectiveness in reducing the size of the store. Pascal then scheduled the script to run weekly on Fridays, proceeding to enjoy the weekend.

However, Pascal's weekend took an unexpected turn when he received numerous reports indicating that Exchange had stopped functioning. Upon his arrival at work, Pascal discovered that the Windows NT 4 server was unresponsive. The services for Exchange were also stopped, and several applications would not run. Pascal swiftly identified the root cause of the issue: his batch file had executed the command DEL *.*, without specifying a directory.

As a result, the script proceeded to delete critical files within the System32 folder, severely damaging the Windows NT 4 operating system. Pascal alluded that the server's status was now beyond repair, necessitating a complete rebuild and data restoration. This ordeal consumed most of the weekend for Pascal, who received additional compensation for his efforts.

Reflecting on the incident, Pascal acknowledged that it was not his most competent moment, but it did prove lucrative for him. He expressed his regret for inadvertently deleting System32 files, which ultimately led to his career taking a hit. If you have ever accidentally deleted something crucial, you can share your story with Pascal and The Register by sending it to their 'Who, Me?' column. Your experience may inspire a future write-up, providing valuable lessons to other IT professionals.

Written by urgent.news from The Register Science's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at theregister.com →

More in Tech

More from Monday 24 August →