USER command passing parameter

Chris Rendall crendall at teamind.com
Fri Feb 28 08:25:21 PST 2014


I'm trying to get a list of filenames that end in .PDF.  

My first attempt was to use opendir() and nextdir(), but that didn't include filenames that were longer than 31 characters.

My next attempt was to use the user command.

I've created a script that takes one parameter for the job folder to look in.  

My script has two lines:
cd /jobs/$1/r-cmtrs
/bin/ls *.pdf

When the filePro code gets to the command: user getPDF=/usr/local/bin/getfillermtlpdf, I get an error: cd: /jobs//r-cmtrs/filler metal: No such file or directory.   On the next filePro line I am passing in the parameter: getPDF=jn, where jn contains the job number of the folder I'm looking in for the PDF files.  When I modify the script and replace the $1 parameter with a valid job number that I'm trying to pass into the command, the user command runs and returned the list of PDF files.

It looks like the user command is executing the script as soon as it gets to user getPDF=/usr/local/bin/getfillermtlpdf, but I haven't passed in the parameter yet.  Is it possible to pass in a parameter for a user command?

I'm running filePro 5.0.14 on Linux.

Thanks,

--- Chris




More information about the Filepro-list mailing list