A machine for the preparation of pharmaceuticalproducts has a pocket conveyor, mobile along a loop-shapedpath and provided with a plurality of pockets,each adapted to receive and withhold a respectivecontainer, and a transfer device for transferring thecontainers with a rectilinear motion between therespective pockets and at least one operating stationfor executing an operation on the containers themselves.