Rapid identification of bacterial infection is very important and in many cases can save human life. Many pathogens can cause infections. While these infections share identical symptoms, the immune system responds differently to these pathogens. The current microbiology lab methods used to diagnose the infection type are time consuming (2-4 days). Thus, physicians may be tempted to start unnecessary antibiotic treatment, based on their wrong diagnosis (based on experience) of the infection. Uncontrolled use of antibiotics is the main driving force for the development of multi drug resistant bacteria which is considered a global health problem. We hypothesize that the different responses of the immune system to the infecting pathogens, cause some minute biochemical changes in the blood componentsthat can be detected by infrared spectroscopy which is known as a fast, accurate, sensitive and low cost method. In this study, we used infrared microscopy to measure the vibrational spectra of white blood cells (WBC) samples of 105 infected patients (69 bacterial and 36 with viral infection) and 90 controls (non-infected patients). The obtained spectra were analyzed using machine learning algorithms to identify the infection type as bacterial or viral in a time span of less than one hour after blood sample collection. Our study results showed that it is possible to determine the infection type with high success rates of 93% sensitivity and 85% specificity, based solely on WBC obtained from simple peripheral blood samples.