Hospital infection numbers have fallen by a third in the last six years, although the proportion of patients with E.coli has tripled, official figures show.
A survey of 13,558 patients in 75 hospitals suggests at least one patient in every 20 in acute (short-term medical or surgical) care has a hospital-acquired infection (HAI).
Health Protection Scotland's Point Prevalence Survey found HAIs in 4.4% of acute patients, "significantly lower" than the 6.6% found in 2006.
The number of cases of C.diff and MRSA bloodstream infections has fallen by over 75%.
However, the overall proportion of bloodstream and urinary infections has risen, with E.coli a growing problem in both.
Health Protection Scotland said: "The prevalence of E.coli was higher (20.8% versus 6.7%) than that reported in the previous Scottish PPS (survey)."
It said the growing resistance to antibiotics could not account for the rising prevalence of E.coli in Scottish hospitals.
"Unlike most countries in Europe, resistance to key anti-microbials in E.coli from bacteraemias (blood bacteria) has not increased in the UK (including Scotland) in recent years and can therefore not explain the observed increase in incidence of E.coli bacteraemias.
"Further work is needed to describe these E.coli data in order that future targeted interventions can be designed to reduce the prevalence."
The proportion of patients with urinary tract infections (UTI) has risen by over 50% from 15.6% to 23.8%, with E.coli accounting for half of these.
UTI was also the most common cause of secondary bloodstream infections (BSI) which more than doubled from 3.8% to 10.6%.
The proportion of patients with E.coli in their blood has quadrupled in the last six years (5% to 20%).
E.coli still remains the second biggest BSI behind Staphylococcus aureus, which accounted for almost a third of BSIs, although this has come down slightly (37.8% to 31.4%).
Pneumonia rates doubled (9.3% to 18.1%) but a large drop in gastrointestinal infections was recorded (20.1% to 5.7%).
Health Protection Scotland now recommends that hospitals make urinary and bloodstream infections their "priority targets" for prevention, alongside pneumonia.
Professor Jacqui Reilly, lead consultant and director of the Point Prevalence Survey, said: "The study demonstrates that the epidemiology (distribution and patterns) of HAI in acute and non-acute care has changed substantially since the last survey.
"The prevalence of HAI overall is significantly lower, indicating that the burden of infection in Scottish hospitals is lower than five years ago.
"Nonetheless, on average at least one patient in every 20 on a ward in acute care at any one time has an HAI and thus we must continue to strive to reduce these infections further."
Health Secretary Nicola Sturgeon said those working to reduce HAIs "are to be congratulated on their efforts".
She said: "Today's reports highlight just how far we have come. The overall level of infections has reduced by one third since 2006 and cases of some types of infection which cause particular concern, such as C.diff and MRSA blood stream infections, have fallen by over 75%.
"This is good news but I am in no doubt that there is still more that can be done as we strive to embed quality in all aspects of patient care in Scotland."