I thought I could do this, but this is just not my profession. Below, I am trying to take the second column of data and produce a .txt (.csv) which separates the second column into two columns. There is a comma present in the data but it is surrounded by double quotes.
I am getting a .txt file that reads
SourceFile,GPSPosition
Picture1.jpg,"21 deg 14' 4.621"" S, 159 deg 46' 45.358"" W"
Picture2.jpg,"21 deg 14' 4.621"" S, 159 deg 47' 45.358"" W"
Picture3.jpg,"21 deg 14' 4.621"" S, 159 deg 48' 45.358"" W"
Note: The GPS position is recognised as one cell in .csv looking like "21 deg 14' 4.621"" S, 159 deg 48' 45.358"" W"
I figured I would create two .txt files, One for easting (W) and one for Northing (S) and merge them afterwards.
@echo off
set batdir=%~dp0
pushd "%batdir%"
FOR /F "usebackq tokens=2 delims=," %%A IN ("%~dp0\filename") DO @echo %%A > "%~dp0\output.csv"
Call Easting.bat
I have a second .bat file (Easting.bat) which has Tokens=3. The Results of these two documents are:
"21 deg 14' 4.621"" s
and
159 deg 48' 45.358"" W"
- What command do I use to grab all of the Northing and Easting GPS points in separate rows?
- How do I merge the two files together with as comma-separated values?