Dual mode file opener and command executor