script that creates network input file from .dat files