Code: Select all
"C:\Program Files\TRUECrypt\TRUECrypt.exe" /q /lY /v\Device\Harddisk2\Partition1
It hooks drive Y: up to a USB 500GB drive which I have plugged into my laptop, and it works well.
Truecrypt pops up a password box and I key in the password.
Then back in my batch file I test:-
Code: Select all
if exist Y:\nul goto 20Backup
Is there an easy way, at the DOS command level, to test for the partition before essaying with TrueCrypt?
My current method requires me to take action ("Cancel") if I have not plugged in a drive (for whatever reason).
But if I could test existence of Harddisk2\Partition1 I could avoid wandering through TrueCrypt.
Thanks
Chris