Discussion Locked

Batch file to lock hard drive.

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

We use a program called Wipeinfo (Norton Utilities 8.0) to wipe hard drives. (Program writes 1's & 0's so no data can be recovered from the drives.) I have created a batch file to automate the process. The HD has to be locked to enable direct disk access. When it tries to lock the drive it prompts for yes or no.

How can I automate the locking so it does not prompt for yes or no?

Batch file:
format c: /autotest
format d: /autotest
format e: /autotest
format f: /autotest
lock c:
lockd:
lock e:
lock f:
wipeinfo c: /GOV:5 /BATCH
wipeinfo d: /GOV:5 /BATCH
wipeinfo e: /GOV:5 /BATCH
wipeinfo f: /GOV:5 /BATCH

3 replies

by syscokid

Use the echo command followed by a y and the pipe symbol (which is on the same key as the \ symbol on my keyboard.

echo y | lock c:
echo y | lock d:
echo y | lock e:
echo y | lock f:

This discussion is closed to new replies.