High Resolution Powder Diffractometer (HRPD) and Four Circle Diffractometer/Texture Diffractometer (FCD/TD) are two BATAN-owned neutron diffractometers which have been fully operational since 1992. These are used to investigate structure and texture of crystalline materials, respectively. Before analyzing, the acquired raw neutron diffraction data should first be processed in a specific way to achieve the suitable data format required by the analysis software. This data processing step is a repetitive task for every single experiment which is previously done manually and very time-consuming. The purpose of this development project was to optimize this step to be fully automatic and executable by a code. This work was performed by means of Python code utilizing the array manipulation in re-arranging and re-formatting the raw data. The resulted Python codes were named as hrpd.py and fcdtd.py. These have been successfully done and validated, making data processing step easier, simpler, and significantly faster with only 20 seconds or less required.Keywords: HRPD, FCD/TD, Automatic Data Processing, Neutron Diffraction, Python