Methyl (2-oxo-1-pyrrolidinyl)acetate reacts with (aminomethyl)pyridines with the elimination of methanol to form (2-oxo-1-pyrrolidinyl)(N-pyridinylmethyl)acetamide, which, quaternized smoothly by ROCH2Cl, gives the new salts of N-substituted piracetam. Both steps occur in high yields. The obtained pyridinium chlorides showed antielectrostatic properties, which depend on a carbon chain in alkoxymethyl substituent and bactericidal and fungicidal activity.