GPSFileDepot Forums

General Category => Map Making Support => Topic started by: savage on August 10, 2008, 06:39:24 PM

Title: transcode.bat
Post by: savage on August 10, 2008, 06:39:24 PM
I am not really good with DOS bat script files, but I do not think transcode.bat does what the documentation says. I think the delims= parameter should be "delims=," to match the example in the tutorial.

Anyway, even with the change above, I process only the first MP file. I think I am going to rewrite it using a real shell script. I am not a big .bat guru.
Title: Re: transcode.bat
Post by: -Oz- on August 10, 2008, 08:09:55 PM
did you put all the files in transcodeQ.txt ?

All it does is read all the files listed there and call cgpsmapper
del /q active_transcode.txt

copy TranscodeQ.txt active_transcode.txt

del /q TranscodeQ.txt

echo. >> transcode_log.txt
echo ************************************ >> transcode_log.txt
echo %date% %time% Starting the day's processing >> transcode_log.txt

for /F "delims=" %%i in (active_transcode.txt) do process.bat %%i

del active_transcode.txt

echo %date% %time% Ended the day's processing >> transcode_log.txt
that is the one I use.

I should really integrate it into that program I sent you.  I'll do that tomorrow.
Title: Re: transcode.bat
Post by: savage on August 11, 2008, 03:16:47 AM
Yes I tried to run it as a DOS command file and also under cygwin. Here is my active_transcode.txt file:

..\MA\MAtopo03_A_01.MP,..\MA\MAtopo03_A_02.MP,..\MA\MAtopo03_A_03.MP,..\MA\MAtopo03_A_04.MP,..\MA\MAtopo03_A_05.MP,..\MA\MAtopo03_A_06.MP,..\MA\MAtopo03_A_07.MP,..\MA\MAtopo03_A_08.MP,..\MA\MAtopo03_A_09.MP,..\MA\MAtopo03_B_01.MP,..\MA\MAtopo03_B_02.MP,..\MA\MAtopo03_B_03.MP,..\MA\MAtopo03_B_04.MP,..\MA\MAtopo03_B_05.MP,..\MA\MAtopo03_B_06.MP,..\MA\MAtopo03_B_07.MP,..\MA\MAtopo03_B_08.MP,..\MA\MAtopo03_B_09.MP

and my transcode_log.txt file:

************************************
Sun 08/10/2008 21:28:54.92 Starting the day's processing
Sun 08/10/2008 21:28:54.98 Completed cgpsmapper on ..\MA\MAtopo03_A_01.MP

************************************
Sun 08/10/2008 21:30:20.01 Starting the day's processing

************************************
Sun 08/10/2008 21:36:02.14 Starting the day's processing
Sun 08/10/2008 21:58:12.42 Completed cgpsmapper on ..\MA\MAtopo03_A_01.MP

I can fix that easily using another scripting language. I prefer PERL but I will try your other program first.
Title: Re: transcode.bat
Post by: -Oz- on August 11, 2008, 11:27:01 AM
The issue is definitely with the ..\MA\MATopo03_A_01.MP

If you copy cgpsmapper.exe in the \MA\ folder and then put the bat files in there your transcodeQ.txt should just be
MATopo03_A_01.MP
MATopo03_A_02.MP
etc...
Title: Re: transcode.bat
Post by: savage on August 11, 2008, 02:02:46 PM
I was trying to keep my folder clean. Now it is running. It should be done this evening.
Title: Re: transcode.bat
Post by: -Oz- on August 11, 2008, 03:28:58 PM
Yea, I'll definitely add it to the program I sent you to allow for much easier processing.  Perhaps I can even replace the mapsettoolkit thing.

Glad its compiling.
Title: Re: transcode.bat
Post by: -Oz- on August 11, 2008, 07:55:00 PM
I sent you an email with a new version that includes a tab to do this so you don't need the bat file. Also, you can press cancel on the folders now without issues.

If the program works well for you I'll start rewriting segments of the tutorial and release it.