REM *** Be sure to remove the .txt so that the filename is .BAT *** @echo off ECHO This window will automatically close when you exit Moneydance IF EXIST \\share\folder\~somefilename.lck (GOTO InUse) ELSE (GOTO OK) EXIT :InUse ECHO Moneydance already in use by the following PC: TYPE \\share\folder\~somefilename.lck PAUSE EXIT :OK ECHO %COMPUTERNAME%>\\share\folder\~somefilename.lck \\share\folder\YourMoneydanceFile.MD DEL \\share\folder\~somefilename.lck