Batch converting documents

Here is the situation. We are a company that has been using a professional publishing system, the software is called "ProType". It runs on Solaris 2.4, however it is no longer supported and we are forced to move on to Adobe Indesign. We must convert all our documents (thousands) to InDesign format. ProType comes with an export utility that exports the text to ASCII with all the formatting etc.

The problem is that the export process takes some time for each file. It is taking a VERY long time to export these documents.

How difficult would it be to loop through the documents in a folder, open them in ProType, export them, save, and close them?

As far as I know ProType does not support any type of scripting.

assuming ProType comes with the stand-alone converter:

#!/bin/ksh
for file in *
do
   myProTypeConverter "${file}"
done

Thank you, that's very nice of you to write the code for us.

It looks like I should be putting the folder name where the * and myProTypeConverter is the variable that holds the command to run the converter.

I don't even know what to do to run the code.

I was really hoping someone would tell us if it's possible and my next question would be how do I find someone to hire to do it for us.

The way we would export them one by one is to open ProType and then open the file and then there is a command in ProType to export to ASCII. Being that ProType does not have a scripting capabilities I was worried it would not be possible to eport through Solaris alone and that it would be necessary to someone go into the programming of ProType. Do you think this is true?

Fred,
look through the ProType docs to see if there's any 'command line' utility to do the conversion. That would the first step! If there is, it would be a matter of simple scripting to do what you need.

I'm sorry this took so long.

Ok, yes, it is in fact a command line utility. If I were to be doing it now I would do this:

1) Type: cd /bedford6:/export

2) Then I would type the directory of where the files I want to export are, for example cd /home/mesorah/layout

3) Then I would type: expage P Pg001 > Pg001 where "P Pg001" would be the name of the current file and "Pg001" would be then name of the exported file (the exported file needs to drop the first P).

Could this be automated with a script to loop through every document in a directory while making sure to leave out the P when typing the exported page?