Esempio:

codice:
function abilita ()
{
    if (document.form1.ck1.checked)
        document.form1.file.disabled = true;
    else
        document.form1.file.disabled = false;
}
...
codice:
<form name="form1">

<input name="ck1" type="checkbox" onclick="abilita()">


<input type="file" name="file" size="40">

</form>