[Gpsbabel-misc] Drag and drop question
Brought to you by:
robertl
From: Dillon, R. <Ros...@mt...> - 2008-09-03 22:57:56
|
Alex Mottram supplied the following batch file content on the web page: @echo off gpsbabel.exe -i gpx -f %1 -o s_and_t -F %1.csv That worked great (especially that it drops the output file in the same folder as the input file) except (as he says himself) that it appends rather than replaces the extension. So to actually replace the extension in XP or NT, Alex then provided the following code: @echo off gpsbabel.exe -i gpx -f %1 -o s_and_t -F "%~n1".csv Problem is, this places the output file in the same folder with the batch file, rather than where the input file came from. I wasn't familiar with the syntax used, but I suspect the ~n strips the path as well as the extension. Ideas? Ross "Roscoe" Dillon |