The coupled nonlinear Schrodinger equations governing the optical pulse coupling in a nonlinear directional coupler are solved numerically. The numerical results show that the optical pulse can be coupled back and forth efficiently between the two-coupled waveguides by varying the input pulse duration. The energy transfer efficiency between the two-coupled waveguide can be greater than 90%. It implies that the pulse-width dependent all-optical switching can be realized in a nonlinear directional coupler. (c) 2006 American Institute of Physics.