PDA

View Full Version : Batch file help needed


CrowHitsJet
01-10-2004, 21:44
I'm trying to make a batch file based on a simple command line for converting files from .jpg to .pdb (for viewing on Palm OS).

The command line to do so is as follows:

par c -a stream name_of_file.pdb "name_of_file.jpg" MMPA MMPL name_of_file.jpg

I don't think it's necessary to know what those attributes are, I don't understand it but it works just fine. If I copied a jpg named name_of_file to that folder and ran the .bat it'd spit out name_of_file.pdb - wonderful.

However, simple as it is to run the batch file I still need to edit it to change the name_of_file for each .jpg I want to convert which somewhat defeats the purpose. I'd love for it to prompt me for the filename as I ran the .bat but can't find out how. The three instances of "name_of_file" will all be the same so it only needs to ask once and put it in those three places. Can anybody help?

free4allnufc
01-10-2004, 21:56
You need to use parameters in your batch file, change the batch file to:

par c -a stream %1.pdb "%1.avi" MMPA MMPL %1.avi

The %1 is replaced with the parameter you pass in when you run the batch:

mybatchprog mymovie.avi

Hope this helps!

CrowHitsJet
01-10-2004, 22:15
You need to use parameters in your batch file, change the batch file to:

par c -a stream %1.pdb "%1.avi" MMPA MMPL %1.avi

The %1 is replaced with the parameter you pass in when you run the batch:

mybatchprog mymovie.avi

Hope this helps!

Works perfectly... and with Command Prompt Here installed it couldn't be easier. Many thanks!

cjb110
02-10-2004, 10:29
You could add the command to the AVI filetype as well, Tool>folder options>file types, pick AVI and press the advanced button, new action.

Give it a name in the first box, and the same command line from the batch file (with " around anything that could be a long filename).

Then it should appear when you right click the avi.