We present the isolation of single attosecond pulses for multi-cycle and few-cycle laser pulses from high harmonic generation in overdense plasmas, calculated with particle-in-cell simulations. By the combination of two laser pulses of equal amplitude and a small frequency shift between them, we demonstrate that it is possible to shorten the region in which the laser pulse is most intense, therefore restricting the generation of high harmonic orders in the form of attosecond pulses to a narrower time window. The creation of this window is achieved due to the combination of the laser pulse envelope and the slow oscillating wave obtained from the coherent sum of the two pulses. A parametric scan, performed with particle-in-cell simulations, reveals how the pulse isolation behaves for different input laser pulse lengths and which are the optimal frequency shifts between the two laser pulses in each case, giving the conditions for having a good isolation of an attosecond pulse when working with laser-plasma interaction in overdense targets.