Use FOR /F “tokens=,” %l IN (location.txt) DO ….



Please send example location.txt if you want more hints.





From: [] On Behalf Of James Shilt
Sent: 31 January 2007 07:09
Subject: [Gpsbabel-misc] Upload to gps by position.



I have been using the following batch file to do uploads.

gpsbabel -i garmin,get_posn -f usb: -o xcsv, -F location.txt
type location.txt
set lat=39.21965
set lon=-94.40514
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.