USER command passing parameter

Chris Rendall crendall at teamind.com
Fri Feb 28 08:34:46 PST 2014


I was looking through the recent discussion of the USER command before send my earlier question.  I emailed my question and then I read Ken's replies again and I was able to get it work.

What I did was modify my script to be:

read name
cd /jobs/$name/r-cmtrs
/bin/ls *.pdf

Then I was able to send a job number as a parameter in filePro and the user command worked correctly!

--- Chris

-----Original Message-----
From: Chris Rendall [mailto:crendall at teamind.com] 
Sent: Friday, February 28, 2014 10:25 AM
To: filepro-list at lists.celestial.com
Subject: USER command passing parameter

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


_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
Subscribe/Unsubscribe/Subscription Changes http://mailman.celestial.com/mailman/listinfo/filepro-list


More information about the Filepro-list mailing list