Use FOR /F “tokens=,” %l IN (location.txt) DO ….
Please send example location.txt if you want more hints.
I have been using the following batch file to do uploads.
garmin,get_posn -f usb: -o xcsv,style=currentlocation.style -F location.txt
set /p lat=What is the latitude of your center point? Default is at home
set /p lon=What is the longitude of your center point? Default is at home
ECHO Uploading to GPS....
gpsbabel -w -N -i gpx -f unfound.gpx -x radius,distance=500M,maxcount=990,lat=%lat%,lon=%lon% -o garmin -F usb:
I would like to be able to automate the middle section but can not figure out how to get the information from location.txt into the variables.
Any help would be appreciated.