i’m having troubles splitting a .txt file that i exported from a db.
The file contains longitude and latitude coordinates where each entrie has the following structure:
5d11'25.753"W 39d1'29.733"N 0.000
I need to split this file into two separate files, one that contains the longitude and other the latitude. I don’t need the 0.000 in the records.
Any idea on how i can do this, the file is quite long and i can’t do it manually.
For a given input file ‘input.txt’, this should create two outputs (‘long.txt’ and ‘lat.txt’) with the appropriate columns. Note, if you run it again, you’ll need to delete ‘long.txt’ and ‘lat.txt’, or the columns will simply be appended to the existing file.
Based on this answer.
Just copy the code into a batch file (extract.bat) and run…