Catalysis of the transfer of the non-reducing terminal alpha-D-glucose residue from a 1,4-alpha-D-glucan to the 4-position of an alpha-D-glucan, thus bringing about the hydrolysis of oligosaccharides.