Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
We use Eudora 5 on a network (Win98 workstations on a Linux/Samba fileserver), and each mailbox generates a locking file when in use (owner.lok). If Windows falls over, the lok file is left & generates a false 'mailbox in use' warning. To clear this, you have to delete owner.lok.
I'm trying to write a batch file which tries to delete owner.lok and then runs eudora. This works unless owner.lok is genuinely in use by another copy of eudora, when DOS correctly gives a sharing violation (error 32 i think) and abort/r/f, requiring manual response. What I want it to do is carry on & run Eudora so that Eudora can put up its 'in use' warning. How can I stop the batch file jamming here? I've tried:
echo a | del h:\eudora\owner.lok
and:
echo f | del h:\eudora\owner.lok
as given at
http://computing.net/dos/wwwboard/forum/2711.htmlHere's the file so far:
if exist h:\eudora\owner.lok goto wipelok
goto runeud
:wipelok
echo f | del h:\eudora\owner.lok
if errorlevel 1 goto runeud
:runeud
start /max d:\progra~1\qualcomm\eudora\Eudora.exe h:\eudora
@echo off
cls
---------Could I maybe detect that owner.lok is currently off-limits without triggering the error?
Grateful for any helpTim

COMMAND.COM has many undocumented switches. One of them is the /F switch, which responds FAIL to such questions.
So, instead of:
echo f | del h:\eudora\owner.lok
Use this:
%COMSPEC% NUL /F /C del h:\eudora\owner.lok
The %COMSPEC% variable stores the command interpreter (command.com) full path. The 'NUL' supresses the output.
Besides the /F switch, I've found 3 other undocumented switches for COMMAND.COM:
/D - Don't know what this one does yet
/T - Same as /P, but won't run AUTOEXEC.BAT
/Z - Display errorlevel after each commandThere could be more, I'm no sure.
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br

![]() |
Dos Networking!
|
UI C Library
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |